Hi kathrin. there is a topic about l18n:
http://groups.google.com/group/cake-php/browse_thread/thread/63e589937b1d545a?hl=en i think you need something like this: $language = 'deu'; $this->Session->write('Config.language', $language); or this: $language = 'deu'; Configure::write('Config.language', $language); cheers, daniel Kathrin schrieb: > Hi, > ich work with cakephp 1.2 dev. I use in my project the multilingualism > and everything is OK. Now I want to implement a Button for user to > change the language. > I have found the class L10n::__setLanguage ( $language = null) and > the in __bindTextDomain ($domain, $directory=null) in I18n Class > Reference and in the base.php > function __d($domain, $msg, $return = false) { > if(!class_exists('I18n')) { > uses('i18n'); > } > $calledFrom = debug_backtrace(); > $dir = dirname($calledFrom[0]['file']); > > if($return === false) { > echo I18n::translate($msg, null, $domain, 5, > null, $dir); > } else { > return I18n::translate($msg, null, $domain, 5, > null, $dir); > } > } > Now I have write in my script /project/views/viewsnames/index.ctp > > <?php $lang = 'deu'; > uses('i18n'); > I18n::__bindTextDomain($lang);?> > <th><?php __d(5,'Surname',false);?></th> > > an something is wrong: Its fetch the Surname from eng/core.mo > and show : > Notice: Undefined property: I18n::$category in /web/htdocs/ > cake_1.2.0.4206_dev/cake/libs/i18n.php on line 322 > > Have somebody an idea? > Thanks a lot for help!! > Kathrin > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
