0
votes

I'm trying to solve a Internationalization problem with CakePHP but I cant get cake to start localizing... even though I have everything set up as the documentation requires... my problem is twofold:

first I'd like cake to localize all __(''); strings I defined in the views. The second thing is that I have a datetime input field which I'd like to localize as well... currently my Locale folder looks as follows:

/Locale
-cake_dev.pot
-cake.pot
-default.pot
-/DE/LC_MESSAGES/
--default.pot

and in my /config/bootstrap.php the last line is:

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

thx so much for your support!

2
You should provide some codeMike
It is always a good idea to consult documentation first or see how other code/plugins handle it, e.g. github.com/cakephp/localized/tree/master/Localemark

2 Answers

0
votes

I'm not sure if Cake internally converts DE to DEU, further it should be lower cased. Systems other than windows are case sensitive. So try "deu" instead of "DE".

0
votes

Indeed it should be deu. And you need rename deu/LC_MESSAGES/default.pot to deu/LC_MESSAGES/default.po, open it in poedit, update it (catalog) from default.pot and translate it. On save deu/LC_MESSAGES/default.mo will be compiled, this file is used by cake.