apache > lenya
 

Translating Lenya

If you want to contribute translations to Lenya, you need to know about dictionary files only. If you are a developer, read the key naming conventions too.

Dictionary Files

Dictionary files are loacted at

  • lenya/resources/i18n/*(_)?*.xml

  • lenya/pubs/@@pubname@@/lenya/resources/i18n/*(_)?*.xml

The latter one is a publication specific translation file which gets merged with the global one. The publication specific translations will override the global ones. An example name for a dictionary file is cmsui_de.xml or cmsui_fr.xml where _de and _fr are the official locale extensions. If you want to contribute a translation, make a copy of cmsui.xml , add your locale extension to the file name, and translate the text as shown below

Change

<message key="lenya.news.main.title">Maintain News</message>

to

<message key="lenya.news.main.title">News verwalten</message>

When you are done, submit a bug report to Bugzilla and attach your new dictionary file. That way, it gets noticed and can be added to Lenya.

Message Key Naming Conventions

In general we can differ between

  • global messages

  • context specific messages

It is considered a good practice to encode the context within the message key. This will avoid key collisions if message catalogies of different contexts are merged. The context should be the key's prefix and MUST always start with "lenya.".

We propose here to use the following naming scheme of i18n message keys.

Global Message Keys

<message key="lenya.common.delete.label">Delete</message>
<message key="lenya.common.delete.hint">Delete object</message>

<message key="lenya.common.delete.label">Cancel</message>
<message key="lenya.common.delete.hint">Cancel current action.</message>

In the above examples the context is lenya.common which indicates the global context.

Context Specific Message Keys

<message key="lenya.news.main.title">Maintain News</message>
<message key="lenya.news.delete.hint">Delete all selected news items.</message>

It is up to the message author how long(detailed) the context prefix is.

I18N Survival Resources