I'm just beginning the process of exploring i18n in CakePHP and I've bumped into something I can't get right via trial and error.
For my app, nearly every page has the same page title - only 2 pages are different. In my layout, I'm using the $title_for_layout variable and, because almost every page has the same title, I'm setting that default in AppController->beforeFilter(). I can then change the title in those views that differ. That part is working great, but now I need to i18n on top of that and it's not working. I've changed the assignment in AppController->beforeFilter() to: $this->pageTitle = __( 'PAGE_TITLE_DEFAULT', true ); But what I get back is "PAGE_TITLE_DEFAULT". If I remove the translation and just supply the default string, all is well. Moreover, I'm trying to create my i18n approach around multiple .po files rather than just one because I think it'll be easier to maintain. I ran ./cake i18n to create the .pot files and copied - app_controller.pot to eng/LC_MESSAGES/-app_controller.po. If I use default.po instead, the translation also works. Anyone have any ideas? I'm having trouble tracking down more than a couple of blogs/articles with info on non-trivial i18n with CakePHP, so any suggestions would be much appreciated. Thanks. Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
