]> git.vomp.tv Git - vompserver.git/blob - l10n/format-definition
15 years that line of code has been waiting to crash
[vompserver.git] / l10n / format-definition
1 The format of VOMP localisation files is described below.
2
3 Each file may contain one or more languages, and a language may be contained
4 in more than one file.
5
6 A valid file must start with a line of the following form for each language
7 in the file:
8
9 vomp-l10n:[<wsp>]<lang-code><wsp><lang-name>
10
11 <wsp> represents a whitespace string (spaces and/or tabs).
12 <lang-code> can be any string of visible ASCII characters. It is intended to
13 be a recognised language code or locale code.
14 <lang-name> can be any UTF-8 string.
15
16 Example:
17
18 vomp-l10n: cy Cymraeg
19 vomp-l10n:ga-IE Gaeilge
20 vomp-l10n:      gd-GB Gàidhlig
21
22 The first line not of this form begins the main body of the translation file.
23
24 A line of the following form introduces a key to be translated:
25 x:[<wsp>]["]<text-key>["][<wsp>]
26
27 <text-key> represents an ASCII string.
28 Quotation marks (ASCII 34) are optional and would normally be used to include
29 whitespace at the beginning or end of the string.
30
31 A line of the following form provides a translation for the previous key.
32 If there is no previous key, the translation is ignored.
33
34 <lang-code>:[<wsp>]["]<translation-text>["][<wsp>]
35
36 <lang-code> must match one of the codes introduced by the vomp-l10n:
37 section; otherwise the line is ignored.
38 <translation-text> can be any UTF-8 string.
39
40 Any other lines (blank or otherwise) are ignored. Nonblank lines should be
41 treated as comments and preserved by tools written to manipulate these files.
42
43 Example:
44
45 x:      One
46 cy:     Un
47 ga:     Aon
48 gd:     Aon
49
50 * This is a comment. Note the trailing whitespace below.
51 x:"two "
52 gd:             "dà "
53 ga:             "dó "
54 This is a comment, perhaps giving a good reason why the translation below
55 has no trailing space. The quotation marks have no effect here.
56 cy:     "dau"
57
58 (Thanks to http://home.unilang.org :-)