've been reading a lot about l10n in cakephp now, but there seems to
be some
confusion about what is the correct way to use languages...
I have created two test languages in:
/app/locale/eng/LC_MESSAGES/default.php
/app/locale/fre/LC_MESSAGES/default.php
I am displaying my test string in a view with __('test') and it
displays the
value for the english (default language) fine. However, I do not seem
to
find the right way of changing the language in my application.
My /app/controllers/app_controller.php includes the following:
<?
uses('l10n');
class AppController extends Controller {
...
function beforeFilter() {
Configure::write('Config.language', 'fre');
}
...
}
?>
I have also tried to change the language using both 'fr' and 'fre' and
changing the the beforeFilter() to try with
$this->L10n = new L10n();
$this->L10n->get("eng");
instead of
Configure::write(Config.language', 'fre');
But that doesn't work either...
I've spent 3 hours trying to figure out how to switch the language
now...
That's frustrating!
Hope someone has an idea ;-)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---