[openbeos] Re: Coding Guidelines, translations

  • From: DarkWyrm <bpmagic@xxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 09 Nov 2001 17:20:17 -0500

>
>Just my 0.02 from being involved in localizing Opera and
>Sonork to German. It may be in the interest of OBOS and each
>app. developer that his/her app appears in as many languages
>as possible. The beauty of having a language file that can
>be chosen at runtime is that it spurs foreign localizations
>without you necessarily knowing of it or having to be
>involved in it. 
>
>In Sonork it's just three text files, and believe me, from a
>localizator's point of view that method is much more
>friendly than a hard-coded ("compiled") version, which you
>cannot check without major delays, because if you spot an
>error or a line overrun or whatever, you just fix it, reload
>the lng. file and presto!
>
>Helmar
Guys, we have such a beast already. SpLocale for BeOS has been abandoned; its 
source has been released, and there shouldn't be any licensing issues (it's 
free for free applications). I've used it and it would be easily incorporated 
into an existing app.

For the uninitiated:
<shameless plug>
It stores translations as attributes attached to a file and looks them up. 
Locale files are stored in their own directory under home/config and are 
internally located by use of queries. Incorporating it into an already 
existing app involves three things: deriving the app's BApplication subclass 
object from SpLocaleApp and not BApplication, calling SpTranslate() for any 
strings needing translation and including the SpLocale.h header in any file 
which makes that call. Ideal situation for lazy programmers like myself. It 
also comes with its own editor and preferences app. Multiple preferred 
languages, too. :)
</shameless plug>

--DarkWyrm


Other related posts: