Centova Cast
v2.1.4

 
 
Box shot
Featured Product
Centova Cast
The complete streaming radio hosting solution!

 
Helpdesk
Can't find what you need?


Centova Cast v2.x Localization
Apr 18, 2012 06:00am
Question:
How can I translate Centova Cast v2.x into another language?
Answer:
As of version 2.0, Centova Cast localization is very straightforward.  Please follow these steps to create a new Centova Cast language file.
  1. Create a new directory under /home/centovacast/system/locale/ to contain your language.  For example, if you're translating to French, you might use /home/centovacast/system/locale/fr_FR/.
  2. Copy the sample /home/centovacast/system/locale/en_US/locale-en_US.php file to the new directory with the new locale name.  For example, if your locale directory is fr_FR, you'd name it /home/centovacast/system/locale/fr_FR/locale-fr_FR.php.
  3. Edit your new language file and enter translations for all of the English strings.
  4. Edit system/config.php, locate the line that says: define('LOCALE','en_US'); and change en_US to your new locale.
After updating the config.php file, your new language will immediately take effect.  Note that a number of the UI headings are rendered as images (saved under www/theme/images/ with filenames beginning with the word "heading-").  You may wish to translate those as well to achieve a "complete" localized experience.

Also note that Centova Cast performs caching on certain elements of the interface, so you may need to logout, wait 90 seconds, and then log back in after updating the language file if you still see English text.



Troubleshooting

I've performed the steps above but it doesn't work!

The steps above have been successfully used by our clients to translate Centova Cast into at least a dozen languages that we are aware of.  Thus, the instructions above are definitely accurate.

The support department regularly receives emphatic and insistent reports that the internationalization system does not work, however in every case to date, it has eventually been determined that one of the steps was simply performed incorrectly.

Please double-check your work, step-by-step, and ensure that you have performed the steps exactly as instructed.  Common pitfalls include:
  1. Using mismatched file/directory names.  If your locale directory is /home/centovacast/system/locale/fr_FR/ then you MUST name your locale file locale-fr_FR.php.  The fr_FR portion of the filename MUST match the directory name.

    Note that this is also case-sensitive, i.e., fr_fr is not the same as fr_FR.

  2. Entering the wrong locale name in /home/centovacast/system/config.php.  If your locale directory is /home/centovacast/system/locale/fr_FR/, then you MUST use define('LOCALE','fr_FR'); in your config.php file.

    Note that this is also case-sensitive, i.e., fr_fr is not the same as fr_FR.

  3. Mis-reading the instructions in the locale-en_US.php file.  Ensure that you have read the example under the "README" section, and specifically, make sure that you placed your translations within the empty quotes on the RIGHT-HAND SIDE.

    For example, if the text you're trying to translate in the language file is:

    'Welcome, %s!'=>''

    ...then you must enter your translation as:

    'Welcome, %s!'=>'Bienvenue, %s!'       [CORRECT]

    Clients commonly and mistakenly use the following syntax:

    'Bienvenue, %s!'=>''         [INCORRECT]
Note that these are just the most common mistakes; if you are still experiencing problems, please go back to step 1 and check each step to make sure you've executed it correctly.


My locale does not use a 12-hour date format.  Can I customize this?

Yes.  Refer to the _DATEFORMAT, _TIMEFORMAT, _NODAYFORMAT, and _NOYEARFORMAT strings in the locale file, which allow you to change the way dates and times are represented in Centova Cast when your locale is active.


My language uses extended (non-ASCII) characters, and they're showing up incorrectly.

Make sure that you're using a text editor that is UTF-8 capable.  Centova Cast internally operates exclusively in UTF-8 to ensure support for all possible languages and character sets.  The locale file should be saved with UTF-8 encoding in order for the special characters to be preserved.  (Hint: Microsoft Notepad is not UTF-8 capable.)

UTF-8 capable editors include*:
  • UltraEdit (commercial)
    For UTF-8 mode: Click File->Conversions->ASCII to UTF-8 (Unicode Editing).

  • Notepad++ (free)
    For UTF-8 mode: Click Format->Convert to UTF-8 without BOM)

  • Most other modern text editors also support UTF-8 mode, as UTF-8 is the standard for international character sets.
* This is not an endorsement of any particular application.





Posted by Centova Technologies
feedme@centova.com