Re: Yet another I18N approach

Splash Forums PrettyFaces Users Yet another I18N approach Re: Yet another I18N approach

#23472

Hey Harald,

that’s very impressive. It actually looks very similar to what I would have done for implementing such an requirement.

We know that there is currently no enough documentation. But we will address this as soon as we got 2.0.0.Final out, which will hopefully be very soon.

We already started some discussion regarding the I18N in our development meetings some months ago. Unfortunately we didn’t find a solution that would fit all the needs people may have. Therefore it is very interesting to see how you implemented it using the existing API.

I think it is OK to use custom HttpOperations in such an special usecase. IMHO it is one of the strength of Rewrite that you can always implement custom conditions or operations for special requirements.

One of our ideas was to support some kind of pseudo parameter that could be used in rules and would represent an internationalized text (something as “search” vs “suche”). The would allow something like /de/kategorie/13 and /en/category/13:

.defineRule()
.when(Path.matches(“/{lang}/{lang:category}/{param}/”)
.where(“lang”).bindsTo(LocaleBinding.bundle(“languages_bundle”))
.where(“param”).matches(“\d+”))

But we didn’t follow this idea further as we were not sure if this is something people would like to have in the API. I think it’s interesting that you are using a property-based approach for this too.

@lincoln: Any thoughts on this?