Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Multiple languages

Multiple languages

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 21 Aug 2002 20:22:54 +0200 (MET DST)

A few minutes ago we again touched the subject of multiple languages in
Rockbox.

I'd like to propose a very simple system on how we deal with this. This only
covers how we get the translations on disk, not how we actually use them in
the code. We'll get to that too.

1. I want each language in a separate human-readable text file.

   (To make it easy for *anyone* to read, edit, diff, patch, etc)

2. I want tools that generate whatever kind of files we want for the build or
   run-time environment to work with the language. Whatever format we want
   doesn't affect the translators. It also makes us free to decide on
   build-time or run-time selections (etc) later.

3. We create a tool that generate a "template" for a specific language. It
   also accepts the existing translation as input, so that if we add an
   enlish phrase, just running this tool adds the new phrases to the
   language's file ready to be filled in, using the english one as "backup"
   in case there's no localized version written.

I suggest that each language gets a text-file in a format similar to this:

------ example-language.txt ------
# we support comments

# a couple of fields for each phrase

# Description of the string
DESC: English language comment for the translator

# The original (english?) language phrase
ORIG: USB Mode

# The ID, must be unique among all phrases
ID: USB_MODE

# The localized version of the ORIG phrase
TEXT: USB Mode
--------- end of language -------

Of course, is the end-result somewhere, the ID would be what the code should
use to identify this specific string.

-- 
Daniel "Bagder" Stenberg -- http://rockbox.haxx.se/
Received on 2002-08-21

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy