[Yanel-dev] Differentiating between requested language (e.g. content, browser) and user language (e.g. editor)

Michael Wechner michael.wechner at wyona.com
Tue May 25 21:40:01 CEST 2010


Michael Wechner wrote:
> Hi
>
> I have noticed that the I18nTransformer3 does not differentiate 
> between requested and user language.
>
> An example would be a user who speaks english is signed in and 
> requests a page with german content.
>
> Then one could expext that the UI widgets are denoted in english, but 
> the content is italian.
>
> At the moment this is not possible, but it should not be hard to 
> enhance it by introducing another namespace.
>
> At the moment we have
>
> xmlns:i18n="http://www.wyona.org/yanel/i18n/1.0"
>
> <i18n:text key="title"/>
>
> and I would like to introduce an additional one
>
> xmlns:i18n-ui="http://www.wyona.org/yanel/i18n-ui/1.0"
>
> <i18n-ui:text key="context.menu.edit"/>

maybe it's better to use the same namespace, but a different local name, 
e.g.

xmlns:i18n="http://www.wyona.org/yanel/i18n/1.0"
<i18n:ui-text key="context.menu.edit"/>

or use a localization namespace

xmlns:l10n="http://www.wyona.org/yanel/l10n/1.0"
<l10n:text key="context.menu.edit"/>

WDYT?

Btw, some useful links:

http://en.wikipedia.org/wiki/Internationalization_and_localization
http://www.mozilla.org/docs/refList/i18n/
http://cocoon.apache.org/2.0/userdocs/transformers/i18n-transformer.html


Thanks

Michi
>
> and hence allow to differentiate between content and user.
>
> WDYT?
>
> Thanks
>
> Michael



More information about the Yanel-development mailing list