4

I have already done all the I18N and GetText things in multiple languages for an existing site.

For selecting one language or another it seems that prefixing urls with path parts like www.domain.com/fr_FR/my_action or www.domain.com/de_DE/my_action is the best way to go, gor Google friendly sites.

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

Is it the right way (or current best practice) to do this in Catalyst?

It promises that I do not need to change my actions, my required arguments and urls.

Or this plugin/technique makes a overload in the server that I can better avoid rewriting all my urls by hand?

Regards: Migue

Nacho B
  • 1,573
  • 1
  • 12
  • 16
  • Looks like a good solution to me. What problem are you having? – ikegami Mar 15 '13 at 23:01
  • Its not implemented yet, so I have no specific problems, but this time I CAN'T make a bad decision. It is the biggest site I ever built (more than 125.000 pages served by day, and not a big server infrastructure).I can´t make a proper load test, and I am afraid of an additional process added to every connection... – Nacho B Mar 15 '13 at 23:54

2 Answers2

0

Are www.domain.com/fr_FR/my_action and www.domain.com/de_DE/my_action the same resource, just represented in different languages? Or would your users see different contents depending on the language they choose (like, I don't know, different news)?

If the answer to the first question is yes I'd rather go for implementing Accept-language header compliance, for example using I18N::AcceptLanguage, which has the additional benefit that it won't interfere in any way with how you designed your URLs.

larsen
  • 1,431
  • 2
  • 14
  • 26
0

I take the risks and implemented the Catalyst-Plugin-I18N-PathPrefix plugin. It was easy, and the server load (that was my main concern) seems to be unnoticeable.

Lets say... I should use time to optimize a lot of things of my own code before be concerned about the plugin performance.

Thank you, anyway.

Nacho B
  • 1,573
  • 1
  • 12
  • 16