Internationalization - bug translation ?


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">
    <unzip from="${bundle.fileName}" to="/" prefix="web">
    <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/" to="nuxeo.war/WEB-INF/classes/" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/" to="nuxeo.war/WEB-INF/classes/" addNewLine="true" />
    <delete path="${bundle.fileName}.tmp" />

Any ideas ? Thanks!


0 votes

2 answers




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

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

1 votes