[bind10-dev] internationalization for specification descriptions?

Jelte Jansen jelte at isc.org
Mon Oct 18 07:21:55 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> 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;

module_name.item_descriptions.foo "This value represents Foo"
module_name.command_descriptions.bar "This command bars"

We would also want support for basic substitution, in a log message you'd use
"%error.file_not_found%", filename where the stringbundle definition for en-US
contains:
error.file_not_found "File %s not found"

(actually, I'd need to check but I would expect a logging framework to have
support for this already)

> That way a crude translation involved picking the language you know and
> coming up with the translation for each message in the message set for
> your target.
> 
> This can/should be used to cover log messages and other message
> functions as well and the functionality will be required for the command
> tool.
> 

ack

> Since we have a server local data store I would tend to toss it in
> there, but that is not mine to say.
> 

Personally, I prefer flat key/value files for this, like the one mozilla
extensions use. They have a directory locales, which contain subdirectories
named after all supported locales (en-US, nl-NL, etc.), which contain the
stringbundle files. Whether or not we would want to do this globally or
per-module is open to discussion imo :)

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky79ZMACgkQ4nZCKsdOncXFjACaA6fc5Rt6/SDGOK3wymqrPa+u
PO4AoIV87eTSE5iKJ5HsKdilYe44WlxF
=HT6G
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list