You could use Routes to connect URLs to a controller by an alternate  
name:
Router::connect('/マイアップ/外国語/何々', array('controller'  
=> 'actualController', 'action' => ...));
But that can be become quite a hassle if you have many controllers and  
actions.

Any variables in the URL you could store in two languages:
/myapp/controller/view/english-name-of-post
/myapp/controller/view/日本語バーション
Which means you have two fields in your model: 'id_english' and  
'id_otherlang'.

Constructing URLs is more of a hazzle, you may want to write your own  
helper for that.
Ultimately I see little benefit in localizing URLs for most apps. If  
you're working on something like last.fm, localized variables/ids are  
worth it I guess (i.e. http://www.last.fm/music/М. 
+Баярмагнай).

On 2 Oct 2008, at 05:16, lemp wrote:

>
> What would be the best way to localize URL?
>
> I know I can use gettext function on URL, like in:
> $html->link(__('Logout', true), __('/users/logout', true));
>
> But it seems a bit cumbersome.
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to