Also I wander,,, how other people doing for this kind of site,,, #1) So like I said 2nd language page has much less pages than dealt page. ex) site map page is not work for just translation. I have to show only available page link to the page.
#2) Some image is different at EN and JP page. ex) submit button On Wed, Jul 27, 2011 at 2:23 PM, gloop <[email protected]> wrote: > I use .po files > > kind regards > > On 27 Jul., 23:10, leafchild <[email protected]> wrote: > > Thanks gloop for the response. > > > > Did you use .pot file or DB?? > > > > lc > > > > On Jul 27, 1:32 pm, gloop <[email protected]> wrote: > > > > > > > > > > > > > > > > > Hello leafchild, > > > > > same problem for 1 day :-D > > > > > routes.php > > > > > Router::connect( > > > '/:lang/:controller/:action/*', > > > array(), > > > array('lang' => '[a-z]{2}') > > > ); > > > Router::connect( > > > '/:lang/:controller', > > > array('action' => 'index'), > > > array('lang' => '[a-z]{2}') > > > ); > > > > > app/config/core.php > > > > > // Set default language > > > Configure::write('Config.language', 'de'); > > > > > cake/libs/controller > > > > > var $components = array('Session', 'Cookie'); > > > > > function beforeFilter() { > > > $this->_setLanguage(); > > > } > > > > > function _setLanguage() { > > > if ($this->Cookie->read('lang') && > !$this->Session->check('Config.language')) { > > > > > $this->Session->write('Config.language', > $this->Cookie->read('lang')); > > > > > } > > > else if (isset($this->params['lang']) && ($this->params['lang'] > > > != $this->Session->read('Config.language'))) { > > > > > $this->Session->write('Config.language', > $this->params['lang']); > > > > > $this->Cookie->write('lang', $this->params['lang'], false, > > > '20 days'); > > > } > > > } > > > > > Link musst looks like > > > domain/en/controller > > > domain/jp/controller > > > > > Have fun :) > > > > > On 27 Jul., 21:19, leafchild <[email protected]> wrote: > > > > > > I want to have 2 languages site (en/jp) and JP is default language. > > > > I look at multi-language pages but still confusing,,, > > > > > > ex) > http://book.cakephp.org/view/1228/Internationalization-Localizationht... > > > > > > and url will be: > > > > JP : mydomain.com/whatever > > > > EN: mydomain.com/en/whatever > > > > > > also EN pages has less page than JP pages which mean EN doesn't have > > > > all pages for JP pages. > > > > What should I do when there is no EN page? > > > > > > I don't thinkhttp:// > book.cakephp.org/view/1228/Internationalization-Localization > > > > works for my site. > > > > There are a lot of long sentence that need to be covered, plus this > > > > one not changing URL but changing contents. > > > > > > Should I just use Configure::write('Routing.prefixes', > array('en'));?? > > > > because structure of 2 sites are not exactly same but share some > > > > section. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
