[Merkaartor] I18N (was: OSM-link handle feature for merkaartor)

Dirk Stoecker openstreetmap at dstoecker.de
Wed Apr 23 16:27:48 BST 2008

On Wed, 23 Apr 2008, Timo Schlüßler wrote:

> Of course, here is it.

As I do lot of I18N for a long time now and it is a hard work to rework 
every new code, please follow some guidelines (not only for you, but for 
all current and future readers).

- Every user visible string must be translatable
- Every internal string (scripts/programming/...) NOT (makes lots of
   trouble otherwise with languag specific behaviour).
- Complete strings must be translated:
   Not tr("foo ") + x + tr(" bar")
   but tr("foo %1 bar").arg(x)
- No special language specific handling of number forms, Qt has
   translation features for 0,1,2.., strings.
- Better make two nearly equal strings instead of joining translatable
   parts .e.g if parts of the string are only used for nonzero variables).
   if(a) string a1 else string a1;
   instead of
   string a1; if(a) a1 += b;
- Remember the fact, that the order of words/elements may change totally
   in other languages.

It is sometimes not so easy :-)

http://www.dstoecker.eu/ (PGP key available)

More information about the Merkaartor mailing list