[bind10-dev] internationalization for specification descriptions?
Michal 'vorner' Vaner
michal.vaner at nic.cz
Mon Oct 18 09:27:23 UTC 2010
Hello
On Mon, Oct 18, 2010 at 09:21:55AM +0200, Jelte Jansen wrote:
> > I agree with Michal on this. What I have seen done is that each message
> > has a unique text string that is combined with the current language to
> > find the correct translation in a file or database. It allows for things
> > like different character sets within a given language as well as
> > languages. I believe there is even some standard specification of this
> > method, but I was only peripherally involved.
> >
>
> Don't know about a standard (could be), but I've seen and used this in the form
> of stringbundles, which are really not much more than key/value pairs;
> applications use that key value instead of a message string, and for each locale
> there is one (set of) stringbundle files;
I'm not sure if it is standard, but there's the gettext package and AFAIK it
works like you have in code:
printf(_("Hello world, this is the untranslated message I would print\n",
"main.hello_world"));
Which has these advantages:
• It has a default value for cases the string is not translated (older
translation, no translation at all…)
• The translator runs some script, it extracts these messages and gives him a
nice file to edit. He/she directly sees what is the original text (the
translations are more similar).
• The second parameter makes it unique and tells where it appears.
This is slightly different requirement than with the logging (because there's
the need to have some kind of ID to lookup in manual, or something).
And yes, there's a string bundle somewhere and you end up having key-value
pairs, where key is the double put into _( ) macro.
Have a nice day
--
~, sweet ~
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101018/e6d23164/attachment.bin>
More information about the bind10-dev
mailing list