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



Rockbox mail archive

Subject: Question about V2 .lang file format

Question about V2 .lang file format

From: Andrew Hart <ahart_at_dim.uchile.cl>
Date: Wed, 20 Sep 2006 17:17:42 -0400

Hi folks,

I'm in the midst of writing a utility to build .voice files using the
new V2 lang file format.
I have the parser written and can now read and write .lang files; I
don't yet have code for loading and saving comments in .lang files
(comments are read, but ignored at the moment) and there is still
probably some work to do on recovering from syntax errors and user
stupidity in .lang files, etc.,
but it works fine with english.lang from cvs.

I've looked on the Rockbox site for info about the .lang file format and
found the docs about updating language files which gives a description
of the .lang file format.
However, it does not explain the "user:" lines that appear in phrases.
For instance, you'll often see

<phrase>
   id: LANG_SOME_MESSAGE_ID
   desc: an example phrase declaration
   user:
   <source>
     *: "The message id of a target string"
   </source>
   ...
</phrase>

but there are many examples in english.lang where "user:" does not
appear in a phrase declaration.

So, I'm wondering what does it mean? Do I need to do anything with it?
  I have not encountered a "user:" keyword accompanied by any text at
all. Does it merely indicate that the source, dest and voice tags that
generally follow it are user editable?

Oh, and while I'm at it, what encoding is used for the quoted strings in
.lang files? Is it ASCII, UTF8, another flavour of Unicode or code-page
dependent? I haven't played with any non-english .lang files yet to see
if Visual Basic's internal string and file i/o mangles the text or not.
  As far as I am aware, VB is supposed to use Unicode for string
representation though.

Cheers,
        Andrew.
Received on 2006-09-20

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