Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:54:39+00:00 2026-06-03T03:54:39+00:00

In my CakePHP application, By using cake.bat i created POT files and by using

  • 0

In my CakePHP application,
By using cake.bat i created POT files and by using PoEdit I created PO files.
So by writing __(‘myword’) i can see localized word in my application successfully.

But now I need to localize “timeAgoInWords”.
When i run cake i18n extract, script didn’t get the _dn() words in CakeTime
http://api20.cakephp.org/view_source/cake-time#line-522

So i created a dummy.ctp file and copy-pasted contents from cake-time file to dummy file.
I run cake script and POEdit again. And it created instances like below, into the file app/Locale/tur/LC_MESSAGES/default.po

#: View\App\dummy.ctp:30;33
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] "%d dakika"
msgstr[1] "%d dakika"

In core.php i already set default language to Turkish:

Configure::write('Config.language', 'tur');

But when i check my application, results of timeAgoInWords came in English.

How can i fix this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:54:40+00:00Added an answer on June 3, 2026 at 3:54 am

    Cake’s messages are extracted into a different domain, in this case, the cake domain. This means that cake messages will not be extracted into your default.pot file, but will go into cake.pot file.

    Curiously, cake.pot doesn’t seem to be included in the download, nor does the i18n shell allow you to pass a param to include the cake core during extraction. However, it is still easily done (my comments start with a #):

    $:/var/www/path/app$ cake i18n extract
    
    # if will ask you here if you want to extract from your app folder
    # simply press enter to confirm
    What is the path you would like to extract?
    [Q]uit [D]one  
    [/var/www/path/app/]
    
    # now it will ask you again, in this case enter the cake path
    What is the path you would like to extract?
    [Q]uit [D]one  
    [D] > /var/www/path/lib/Cake
    
    # third time, just press enter
    What is the path you would like to extract?
    [Q]uit [D]one  
    [D] > 
    
    # press enter to accept the app/Locale
    What is the path you would like to output?
    [Q]uit  
    [/var/www/path/app//Locale] > 
    
    # press enter to keep translation domains deparate
    Would you like to merge all domains strings into the default.pot file? (y/n) 
    [n] > 
    

    Now wait for the extraction to finish and enjoy the pain of translating 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a web application using CakePHP. Now with cake after a save
I am using JQuery and cakephp for my application. I have created a select
I'm writing a simple web application using CakePHP version 1.2 (the latest) and am
I'm using CakePHP to build an application using the MVC Pattern, but my question
I am using a very intrinsic database with a CakePHP application and so far
I am developing an application in cakephp. In this application I am using saveAll()
I have made a full application in JQM using cakePHP as the server side
In my CakePHP-1.2 application, I am using the date format 01-Jan-2012 Which date validation
I am using cakephp framework to build my application. I want that, whenever a
I want to run a web application on php and mysql, using the CakePHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.