Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.0
  • Version 1.2
  • Community
    • Lenya Wiki
    • Translations
    • Bug Tracker
    • Mailing Lists
    • IRC
    • Live Sites

Current Event

Built with Apache Lenya

Translating Lenya

Table of Contents
  • Dictionary Files
  • Message Key Naming Conventions
  • Global Message Keys
  • Context Specific Message Keys
  • I18N Survival Resources

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

  • http://intertwingly.net/stories/2004/04/14/i18n.html

  • http://www.joelonsoftware.com/articles/Unicode.html

  • http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode

  • http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF

Copyright © 1999-2011 The Apache Software Foundation. All rights reserved.

Apache Lenya, Apache, and the Apache feather logo are trademarks of The Apache Software Foundation.