Is Catalyst the best way for language prefix?

I have already completed all the I18N and GetText actions in several languages ​​for an existing site.

To select one or the other language, it seems that URL prefixes with parts of the path such as www.domain.com/ fr_FR / my_action or www.domain.com/ de_DE / my_action are the best way to go, gor friendly Google sites.

I found this module: Catalyst-Plugin-I18N-PathPrefix And it seems to be based on this advent article

Is this right (or current best practice) in Catalyst?

These are promises that I do not need to change my actions, my required arguments and URLs.

Or does this plugin / technique do an overload on the server, so that I can better not rewrite all my URLs manually?

Regards: Migue

+4
source share
2 answers

I take the risks and implement the Catalyst-Plug-I18N-PathPrefix plugin. It was easy, and loading the server (this was my main problem) seems to be inconspicuous.

Let's say ... I have to use the time to optimize many things of my own code before worrying about plugin performance.

Thank you anyway.

0
source

Is www.domain.com/fr_FR/my_action and www.domain.com/de_DE/my_action the same resource, only presented in different languages? Or will your users see different content depending on their chosen language (for example, I don’t know, different news)?

If the answer to the first question is yes, I would prefer to use the Accept-language compliance implementation, for example, using I18N :: AcceptLanguage , which has the added benefit that it will in no way interfere with how you created your URLs.

0
source

All Articles