On Tue, Aug 18, 2009 at 12:30 PM, RhythmicDevil<[email protected]> wrote: > >(..) > From what I have read I gather that I wrap all my strings in my views > with __(). Create language directories in /app/locale like the > following: > /app/locale/ > eng/ > LC_MESSAGES/ > en_GB/ > LC_MESSAGES/ > Then I go to the console and run $cake i18n. I give that the path > where the files I want to extract reside and then give it the path > where I want it output the files. The paths I used were: > > /home/swright/vhosts/solowsc/app/views > /home/swright/vhosts/solowsc/app/locale > > This created a file called default.pot in the following location: > /home/swright/vhosts/solowsc/app/locale
You have to put the .po files into the LC_MESSAGES directory for each language. > Thats about as far as I get. I have no idea what to do with the > created file. Where do the .po and .mo files come in? Do I have to > create them? I also would have thought that the output path should > have been a particular language directory. I get the impression from > what I have read that the translation and file creation is an > automated process, is that correct? All you have to do to create the files is enclose your i18n string messages with the __() function. Then, running cake i18n from console, you'll have a default language version .po file. Then copy it to the other LC_MESSAGES language directory and make the translations (with poEdit or a plain text editor). CakePHP uses the .po files to generate (compile) the .mo files internally. You don't have to deal with it. > I have a basic test working but the files are hand created and I dont > think thats the correct way to do it. I would really appreciate if > someone could fill in the holes with, perhaps, a set of detailed steps > what will work for CakePHP1.2. Well... I did an i18n application with Cake sometime ago and I didn't dive into problems. It was an easy job. Check this tips and read the cookboo too and tell us if you're still getting into problems. http://book.cakephp.org/view/161/Internationalization-Localization Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
