Navigation

Recent site activity

Translations

Translation is done through the theming system. Withinthedefault theme or your custom theme, you will find the following folder structure

  • [theme name]
    • text
      • lang
        • [lang_code]
          • confirm_registration.txt
          • engine_translations.txt
          • template_translations.txt

Each text file with the exception of confirm_registration.txt has an ini file format that looks like this:

[string_code] = [string]

The string_code is an identifier used within the Nexus code base to link to the translated text.    When doing a translation, follow these steps:

  1. Create a new folder lang using the language code as the name (such as 'de' for german or 'esp' for spanish).
  2. Copy the text files from the en folder into the new folder.
  3. Translate all english text into target language text
  4. In the share.config.php file located in the config folder at the root, change the default language setting to the same language code you used for the name of the folder (e.g. de). 
  5. In the cache/data/ folder, delete the following files:
    1. engine_translations.php
    2. template_translations.php
  6. Refresh your browser and you should now see your translations where english text used to be.

 

Some Notes

 

  • Each translation string much occupy a single line - you cannot break a string across two lines
  • Double-quotes inside a string must be escaped. That means you have to put a backslash before the quote in order for it to work correctly (e.g. \")
  • Remember that each string must have a quote before and after.  A missing quote can make all strings following that one unrecognizable by Nexus
  • Generated text files MUST be encoded using UTF-8.  Given the right text editor, you can usually just switch the encoding setting with one or two clicks.
  • When new strings are added to the english translation that have not yet been added to another language's string table, Nexus does a lotof work to get something to appear.  Each time that a missing string is encountered, Nexus first tries to regenerate the string table cache. If the string is still not there, then it parses the english string table to find it there.  Needless to say, keeping a translation up to date is important to the smooth running of Nexus.

 

Please report any bugs relating to translations to:

bugs@iwonderdesigns.com