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 7891295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:34:56+00:00 2026-06-03T06:34:56+00:00

I have cake php app and I am using translating function <?php __(‘msg’); ?>

  • 0

I have cake php app and I am using translating function <?php __('msg'); ?>.
I my app/config/bootstrap.php I added line Configure::write('Config.language', 'eng'); – I want english as default language.

I created folder app/Locale/eng/LC_MESSAGES.

Then I opened windows console in my app folder and typed ‘cake i18n extract’ – there were several prompts – I choosed to scan app directory and output to Locale directory.

After i18n procedure in my folder app/Locale few files appeared:

cake.pot
cake_dev.pot
default.pot

and nothing in app/Locale/eng

So I just copied default.pot into app/Locale/eng/LC_MESSAGES and added some translations, but when I open by website nothing is printed in place of __(”) functions…

How to correctly set up 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-03T06:34:57+00:00Added an answer on June 3, 2026 at 6:34 am

    🙂 you need to create a .po file for each lang from the .pot file you’ve just created..
    I suggest using poedit to do that

    In Poedit, go to File->New Catalog from POT file, then select the default.pot file generated by the cake bake. It will ask you some information and then you’ll see all the text to translate, one finished, save it into app/Locale/eng/LC_MESSAGES/default.po

    when you add/delete/modify some of those strings in your code, you’ll need to run the bake again to extract the text. It will update the .pot file, and in Poedit you need to open your .po file and go to Catalog->Update from POT it will show you all the new lines that you need to translate, and sometimes it will try to translate them for you, based on your previous translations

    Hope this helps

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

Sidebar

Related Questions

Using CakePHP 1.3, I have the following layout: /srv/www/_cakephp13/ /app/ /cake/ /plugins/ /vendors/ etc...
This is code that I have added in my vendors/xtcpdf.php file: <?php App::import('Vendor','tcpdf/tcpdf'); class
I have go TCPDF setup in my cake php install and am now trying
I have a CakePHP ticketing app where I am using Revision Behavior to keep
I have to use MS SQL Server 2008 to store data of PHP CAKE
I have a PHP application using CakePHP. I need to present a table showing
I recently read that php applications can be deployed on Google App Engine using
I'm using CakePHP's ACL component to manage permissions for my app. I have about
I am new to cake php and I have a plugin folder in my
Ok, this is definitely weird. I have a cakephp app I'm using. I've removed

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.