Internationalization - bug translation ?

Hi,

Sorry to ask again about internationalization. When I start the default 5.5 cap version some labels are not correctly translated. For example, when I choose FR locale, I got 'Sections', 'Templates', 'Workspaces' in the navigation tree. Am I the only one ?

I tried to override these labels without success. For this I use the following fragment

<?xml version="1.0"?>
<fragment version="1">
<require>org.nuxeo.ecm.platform.lang</require>
<require>org.nuxeo.ecm.platform.lang.ext</require>
<require>org.nuxeo.ecm.user.center</require>
<install>
    <unzip from="${bundle.fileName}" to="/" prefix="web">
      <include>web/nuxeo.war/**</include>
    </unzip>
    <delete path="${bundle.fileName}.tmp" />
    <mkdir path="${bundle.fileName}.tmp" />
    <unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_fr.properties" to="nuxeo.war/WEB-INF/classes/messages_fr.properties" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_en.properties" to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" />
    <delete path="${bundle.fileName}.tmp" />
</install>
</fragment>

Any ideas ? Thanks!

François

0 votes

2 answers

805 views

ANSWER



Hi,

Those three words are not labels but the title values of pre-defined root documents. There's currently nothing in Nuxeo to internationalize documents' titles.

If you're interested in only one given language, you can manually (or programmatically) rename those three documents. But it won't be “internationalized”, meaning it won't depend on the user language.

You may hear about a hack consisting at using "%i18n..." prefix in the documents titles but I don't recommend it since it will only work in the JSF UI (internally, those documents will have bad names; for instance if searching for the translated title, browsing with CMIS or web mobile application, …).

A “good” solution would be to write a Nuxeo plugin which provides translations for (some) documents' titles. Not an easy task I guess.
Another would be to add into those documents some fields with their translations (or reference to). But it requires to override a lot of layouts, content views, navigation tree, … and it also involves handling these labels in searches. You can have a look at NXP-3592 (won't be fixed) to get an idea of what's at stake.

1 votes



thanks both of you
06/07/2012


From what I remember, those container values are hard-coded. But you can right-click on them and rename/edit them.

1 votes