[Mono-devel-list] Re: Why not to use gettext ()

Robert Jordan robertj at gmx.net
Wed Jun 15 17:54:51 EDT 2005


Kornél,

> My reasons against using English texts as identifiers:
> 
> 1. Every modified character in English text has to be modified in all of 
> the
> other language files as well. This prevents distributing satellite
> assemblies separately or using satellite assemblies that are not very up to
> date.

The gettext toolchain is smart enough to deal with such differences.

The ID-based localization doesn't prevent you from deploying
out-of-date assemblies as well.

> As translations will probably done by a different set of people than the
> code I can imagine that satellite assemblies will be released independently
> from the code.
> 
> And this will result in English text being used altought the text is aready
> translated but a single forgotten character was added to the English text.

You tell gettext lovers ;-) nothing new. However, as told, the
toolchain is able to cope with that.

> 2. Mono itself has a complete infrastructure for localization
> (ResourceManager, ResourceSet, ...) designed for identifier based resource
> files.

The infrastructure can still be used. The MO-files (even the PO files)
can be converted to .NET resources.

BTW, I don't know if this solution has been already discussed,
so please forgive my ignorance if so:

- use gettext() in source code
- create the usual MO-files
- translate with the help of the gettext toolchain
- for each MO file create either
    * PO files. Convert them to resources (no tool available at present)
    * text resources (1). Convert them to .resources with resgen.exe
- build satellite assemblies from the .resources

(1) the format is trivial:

	some key = value

Rob




More information about the Mono-devel-list mailing list