On Mon, 22 Sep 2014 06:17:36 -0500
"Edward K. Ream" <
edre...@gmail.com> wrote:
> On Sun, Sep 21, 2014 at 2:04 PM, Peter Noske
> <
noske....@t-online.de> wrote:
>
> > Is there a way now to have / get a version of Leo in German
> > language, a localization one's?
Maybe not adding much here, but my just guessing haven't done
it myself impression of the most general approach to localization is
that all in code strings are wrapped in a function call, with the
function often being called `_` to minimize its intrusiveness. E.g
g.es("No @file nodes in tree")
becomes
g.es(_("No @file nodes in tree"))
I.e. english (typically) is chosen as the language to use throughout
the source, and then the localization machinery handles the
translation, using a lookup table for each supported language, going
from the english to the language in question.
Which is fine for simple text output from code.
Leo will be a bit more complicated because of the way it uses plain
text as a data type. How would we distinguish non-translatable text,
e.g.
@string body-font-family = @font-family
non-translatable in the sense that
@string körper-sind-familie = @sind-familie
won't work, vs. translatable text, e.g.
@string cleo_time_name = 'weeks'
could be
@string cleo_time_name = 'wochen'
I'm guessing the second case is extremely rare though.
But I don't see any reason the _("") part couldn't be worked on - apart
from adding the _("") I assume it's mostly automatic in terms of
extracting the list of strings to translate and generating the tables
for other languages - assuming you can find someone to fill them in.
Presumably the english is shown for untranslated strings.
Cheers -Terry