Your Digital Media Has Never Looked So Good

 
RokuMike

How to do your own SoundBridge language localization!

Fri Jul 22, 2005 2:32 pm

Greetings,

One of the exciting features present in SoundBridge software releases starting with version 2.3 is the ability for the SoundBridge to display its interface in multiple languages. In addition to the languages we ship with, it's possible for users to create their own translations if they would prefer a language that is not provided.

The following instructions explain how to do this.

Before you start
Please note that all SoundBridge models support characters in the standard Unicode Basic Latin (0000) and Latin-1 (0080) tables. VFD-equipped models (all models except M500) also support Cyrillic. Only the SoundBridge Radio (and SoundBridge M1001 units sold in the Asian market with a 32-pixel-high display) can run the user interface in Japanese or Chinese. Characters that are not available will be rendered with a "missing character glyph". If your language requires extensive use of characters not supported on your model, you may not want to spend the effort on localization, as they will not display properly.

Getting the Language Resource File
All of the SoundBridge user interface strings appear in a language resource file. This file can be downloaded from the SoundBridge to a computer, edited to add a localization, and then re-uploaded to the SoundBridge to allow it to use the new language.

The first step to localization is to get the resource file. The file can be retrieved from the SoundBridge itself, via the built-in web server. Connect to your SoundBridge's internal web server (see the User's Guide for instructions if you don't know how), and choose the "Configuration" page.

In the Configuration page, there is a Language section, and there is a link that says "View Current Language Resource File". You can either click this link and then save the page, or right-click (control-click on the Mac) the link to save the link to a file.

Later, after you have edited the file, you will come back to the Configuration web page and use the "Browse" button to select your edited file, then click Update to load the file to the SoundBridge. If no errors are detected, you will then be able to select your new language and test your changes. Otherwise, errors will be reported, and you should correct them and upload again.

Text Encoding is crucially important
This file is in the UTF-8 encoding in order to support accented and other special characters. Please be sure to edit the file in a UTF-8 compatible editor and save it out again in UTF-8 encoding. Notepad on Windows and TextEdit on the Macintosh both handle UTF-8 properly. You may need to force your editor to treat the file as UTF-8 if it doesn't recognize the encoding automatically. (Notepad has an "Encoding" option in its open/save dialogs, and TextEdit has options for this in the Preferences.)

You can ensure that your editor has opened the file correctly by looking at the Swedish localization of the SR_WELCOME_MESSAGE. If it says "LÃ¥t musiken spela" (note the circle over the a), then the encoding is correct. The currently-shipping resource file contains Japanese and Chinese localizations. If your system has suport for these languages installed, you should see the Japanese and Chinese characters. If not, you will probably see "????" for these strings.

The easiest way to preserve the file’s text encoding is to always edit the file and then choose “Save” rather than "Save As...". Most editors will use the original text encoding when choosing "Save", but may choose a different one with "Save As...". You may want to make a copy of the original for reference.

Line-ending formats
Different operating systems represent the end of a line differently. If you see all the strings jumbled together in the file, rather than neatly arranged as shown below, then most likely your editor is not correctly interpreting the line endings. We have tested this with both Notepad and TextEdit and found them to work properly. Consult your text editor's instructions for how to adjust the handling of system-dependent line endings.

Format of the file
The format of the file is a list of string names, each with a list of the localizations for that string. For example, two of the menu items from the server/settings menu appear as follows in the file:

SR_CZ_MENU_SETTINGS
   eng "System Configuration"
   fre "Configuration du Système"
   swe "Systemkonfiguration"
   ger "Systemeinstellungen"
   spa "Configuración del sistema"
SR_CZ_PLAYLIB_PREFIX
   eng "Play %s"
   fre "Lire %s"
   swe "Spela %s"
   ger "%s wiedergeben"
   spa "Reproducir %s"


When adding a language, the localizer should add the name of the language and a 3-letter identifier at the top of the file, in the SR_CURRENT_LANGUAGE list. If the languages is already shown there, but with a "#" at the beginning of the line, just remove that "#". The "#" character is a comment character in this file format -- lines starting with "#" are ignored.

Then, for each of these resource names, add the localized translation of that string, following the model of the other languages.

Localization rules
If you intend to share your localized file with others, it is very helpful to adhere to the following rules:
  • Please leave “eng” as the first line of each text item.
  • Please do not re-order any of the languages in each text item.
  • When translating an item for the first time, please add your translation as the last item in the list. It’s not important that the list of languages be in the same order for each text item, but it’s easier to use text-merge tools to merge these changes if new additions come at the end of each item.
  • If you are modifying/correcting the translation of an item, please leave it in the same location in the list.
  • A few items have special formatting, described below. Please follow these formatting rules, and feel free to ask if there are questions
  • Even if the localized string is exactly the same as the English string, please go ahead and add an entry for the language you're adding. This allows our automated merging tools to work better.
  • Any string starting with “SR_WP” is displayed on the SoundBridge internal web page. You may see HTML-escaped characters in the English translations of these strings (for example, “Salt & Pepper” would appear as “Salt & Pepper”. Generally, any sequence starting with “&” and ending with “;” should be left unmodified unless the translation would contain a different character.
  • Some strings may contain special sequences of characters preceded by the "%" character (see the "Play" item in the sample above). These are used at runtime to substitute text or numbers into what is displayed on screen. %s means that a string will be substituted. %lu means that an unsigned 32-bit number will be inserted, and %ld means that a signed 32-bit number will be inserted. These are standard C sprintf substitutions. Please do not modify these sequences, although you may need to move them depending upon the grammatical rules. See the other languages for examples. In the example above, SR_CZ_PLAYLIB_PREFIX is the menu option shown in the library list, and the %s will be replaced with the library name (for example: "Play Mike's Music Library"). Notice how the "%s" appears at the beginning in the German translation, but at the end in the other languages, because of differences in grammatical rules.
  • Some strings contain a "$product" token. The SoundBridge will substitute the product name for this token when the string is displayed. (For example, "Reboot $product" will be displayed as "Reboot SoundBridge" or "Reboot SoundBridge Radio", depending upon the product.) Do not localize the word "product" -- leave it as-is.
  • Many strings use a … character to indicate an operation in progress, or to indicate that clicking a menu item will require further interaction. This is a Unicode ellipsis character, not three separate periods. You can copy and paste from another string if you need to. Or, on the Mac, just type Option-; (semicolon).
  • On some models, you may see short variants of strings, for example SR_IT_ACQUIRE_LICENSE_SHORT. These strings are used when the full-length version will not fit on screen, and so should be kept as short as the other localizations.

Items with special formatting:
Menus
The following items are the contents of menu items as displayed on the SoundBridge’s internal web page. Each menu item is separated with a back-slash (\). These menus MUST be ordered in the same order that they appear in the English translation. Translated menu items cannot contain the back-slash character. Items in this category:
SR_WP_TIME_MENU_ITEMS
SR_WP_TZ_MENU_ITEMS
SR_WP_DST_MENU_ITEMS

Date and time formats
The following items are encoded date/time formats, which use the tilde (~) character as the separator:
SR_SM_DATE_FMT
SR_SM_TIME_FMT

These items act as default formats, used by the SoundBridge automatically when the given language is selected -- provided that the user has not customized their date/time settings. If the user has customized, their customizations will override whatever is done here. These are formatted as follows:

SR_SM_DATE_FMT
prefix~separator1~separator2~separator3~separator4~menuselection1~menuselection2~menuselection3~menuselection4

SR_SM_TIME_FMT
separator1~separator2~separator3~separator4~menuselection1~menuselection2~menuselection3~menuselection4~AMindicator~PMindicator

Note that any time one of the separator, prefix or AM/PM items is to be empty, it is represented by the word "empty". Do not just leave the field blank (~~) or it will not work properly.

The menuselection items are numbers, and correspond to the following lists:

Date:
0: Leave Blank
1: Long day
2: Short day
3: Long month
4: Short month
5: Numeric month
6: Numeric month with leading zero
7: Day of the month
8: Day of the month with leading zero
9: Long year
10: Short year

Time:
0: Leave blank
1: Hour (12-hour)
2: Hour (12-hour with leading zero)
3: Hour (24-hour)
4: Hour (24-hour with leading zero
5: Minute
6: Second
7: AM/PM indicator

You may want to study the existing localizations to understand how this feature works.

Alphabetic sort order
The SR_LOC_SORT_ORDER contains a special string that determines how text is sorted. The string can contain any alphabetic character in the LATIN-1 character set. No other numeric, symbolic, or non-LATIN-1 characters are allowed.

For Japanese, Chinese or other languages that do not use the LATIN-1 character set, sorting is performed in Unicode code-point order. Unless such a language also requires special sorting rules for the LATIN-1 characters, you can omit localization of this string.

The format of the string is as a list of groups of characters, where the groups are separated by a single space character between them. Each character in a given group is treated as equivalent when sorting. The groups are listed in descending order. In other words, characters in the first group will sort to the top of a list, followed by characters in a second group, and so on.

As an example, an abbreviated section of this string appears below:

eng “AÀÁÂÃÄÅ B CÇ D EÈÉÊË F G H ... aàáâãäå b cç d ...”

According to this string, any capital letter “A” with a diacritical marking is treated equivalently to the unmodified letter “A”. All variants of the letter A sort before the letter B, which sorts before the letter C and its variant, and so on. Lower-case letters sort after any upper-case letter.

When formatting this string, you should assume that upper-case letters always sort before lower-case letters, even though some areas of the SoundBridge user interface override this behavior to do a case-insensitive sort.

SoundBridge does not currently support "special" sorting rules, such as compound characters ("ll", "ch", etc) or French accented sorting rules.

Keyboard text entry
SR_LOC_TE_KBD contains a special string which is used to present the on-screen text-entry keyboard. This string may contain any alphabetic character in the LATIN-1 character set. No other numeric, symbolic or non-LATIN-1 characters are allowed. The first grouping of letters is the lower-case alphabet. The second grouping is the upper-case alphabet. These generally should have the same number of characters. The third grouping contains any “extended” characters, and should contain any LATIN-1 lower-case alphabetic characters not already listed in the other lists. These three groups should be separated with exactly one normal space character between them.

Entry of non-LATIN-1 characters is not possible. For languages that do not use LATIN-1 characters, you may omit localizing this string.

Preset strings
The SoundBridge automatically builds names for new Presets when they are saved. These strings have special tokens in them that are replaced by information from the Preset. For example:
# %1 is Genre, 2 is Album, 3 is Artist, 4 is Composer
SR_PS_GENRE_ALBUM
    eng "%1 tracks on %2"
    spa "Archivos %1 en %2"
    jpn "%2 ? %1 ????"


Notice the comment that explains what %1 through %4 map to. In English, this string will say, for example "Rock tracks on The Joshua Tree". Note, though, that in Japanese, the album will come before the genre. This is why the numbers are used instead of the simple %s string substitution. When localizing these Preset strings, pay attention to the comment explaining what %1 through %4 mean, and follow the model of the other languages.

That's it! Questions are welcome.
Last edited by RokuMike on Mon Oct 02, 2006 3:35 pm, edited 2 times in total.
 
MacAl
Posts: 189
Joined: Fri Dec 03, 2004 6:38 pm

Fri Jul 22, 2005 5:26 pm

"In the Configuration page, there is a Language section, and there is a link that says "View Current Language Resource File". You can either click this link and then save the page, or right-click (control-click on the Mac) the link to save the link to a file.


The configuration page contains several headings in a blue bold font. The words "Current Language Resource File" are in an identical blue bold font with no indication that the line contains a hyperlink. Something like "Click here to display current language resource file" would be a little more obvious.
 
RokuMike

Fri Jul 22, 2005 11:59 pm

It does say "View Current Language Resource File", and at least in my browser it underlines when you roll over. However, I do appreciate your suggestion. The situation is the same on the "Now Playing" screen. The heading and the links on the right are similar in appearance.
 
anagram
Posts: 8
Joined: Sat Mar 05, 2005 12:38 am
Location: The Netherlands

Dutch translation

Fri Aug 19, 2005 6:09 am

I've started a Dutch translation for the SoundBridge. Before I continue, I would like to know if you already have one?
 
rvacha
Posts: 181
Joined: Sat Nov 13, 2004 8:58 am

Thu Aug 25, 2005 11:51 am

If time allows, I'm going to have to work on an Elmer Fudd localization! Wascully wabbitt! :D
 
brahms
Posts: 10
Joined: Sat Sep 24, 2005 9:06 am

Any plan to support fareast languages?

Sat Sep 24, 2005 9:15 am

Do you have any plan to support Japanese/Chinese etc.? At least, how to display ID3 tags in these languages?
 
RokuMike

Sat Sep 24, 2005 11:37 am

We had preliminary Japanese and Chinese support in the 2.3 betas, in fact. However, the fonts were too large and caused problems, so we removed them for now while we improve our compression strategy.

There's an issue with Japanese and Chinese, though, which is that it's very difficult to find a legible font that works in an 8-pixel-high size. So, that makes it hard to do a Japanese or Chinese localization for the M1000, since dialogs and such wouldn't be legible. We're still wrestling with that issue.

On the M2000 and the SoundBridge Radio, with their 32-pixel display heights, we expect it to be more doable.

Please stay tuned! We're working on it.
 
brahms
Posts: 10
Joined: Sat Sep 24, 2005 9:06 am

Sat Oct 15, 2005 6:57 am

thanks for the effort to work out japanese/chinese support.

i just bought a M1001. hope you will find solution for it, not only just M2000.
:D
 
glutier
Posts: 21
Joined: Fri Oct 07, 2005 5:22 pm

Sun Oct 16, 2005 7:59 pm

I have been using a revised French language file for the past few days. No problems so far. I did the following changes:

- Fixed typos (mainly between the verb "a" and the preposition "à")

- Changed the word "librairie" (which translates to "bookstore" :D ) to "bibliothèque", which is the correct word for library.

- Removed the word "morceau", used for "song" (and can also mean a piece broken off something... yuck!), and replaced with "titre" ("title"). Sounded too harsh for my taste and for the design of the SB! :wink:

- Removed capitals on month names. They are never capitalized mid-sentence. Had to double the backslashes because the pair \ and n for novembre was interpreted as a new line character.

- Replaced the welcome message "Let the music play" with "En avant la musique!". I know, it's cheesy, but not as much as "Ta-Daaaah!" :lol: Or "Attache ta tuque avec de la broche!" for a French Quebec touch...

All other localizations are untouched.

I can zip and e-mail the file to anybody interested.

(Haha! An Elmer Fudd file! How about a Smurf version also? :lol: )
 
Onslowj
Posts: 1
Joined: Mon Jan 24, 2005 2:24 am
Location: The Netherlands

Re: Dutch translation

Sat Nov 26, 2005 2:56 am

anagram wrote:
I've started a Dutch translation for the SoundBridge. Before I continue, I would like to know if you already have one?


Did you ever complete this? If yes, is it possible to share this with others?
Thanks in advance!
 
Dimiitrios
Posts: 30
Joined: Sat Dec 10, 2005 5:27 pm

Thu Dec 29, 2005 10:30 pm

Bump on this; Mike, how can we submit new language files?
 
RokuPatrick

Thu Jan 26, 2006 6:43 pm

Dimiitrios wrote:
Bump on this; Mike, how can we submit new language files?

See here:
http://www.rokulabs.com/forums/viewtopic.php?t=6202
 
Koen De Vuyst
Posts: 10
Joined: Sun May 21, 2006 12:54 am

Sun May 21, 2006 1:39 am

I started the translation in Dutch. It will be ready in a few days (depends on my free-time) :)

Greetings,

Koen
 
olco_fr
Posts: 1
Joined: Mon May 22, 2006 9:08 am

Localization : Sorting ignoring some words

Mon May 22, 2006 9:15 am

Hi,

I have notice a cool feature : when I browse by artists, the list is sorted with the word 'the' ignored. So The Beatles is sorted at B ( and also at T ) .

Is there a way to edit this list of 'ignored sorted word' in order to do the same for other language ( Le, La, Les .... in french for exemple )


Olivier
 
Koen De Vuyst
Posts: 10
Joined: Sun May 21, 2006 12:54 am

Sun May 28, 2006 2:37 am

Hi,

Just for saying about 50% of the Dutch translation is done. I hope to finish the file next week.

Greetings,

Koen

Who is online

Users browsing this forum: No registered users and 2 guests