The Single Most Important Internationalization Tip

This post may be news to developers in the US but I (like most of the people in the world) have lived all my life on the wrong side of incorrect internationalization/localization efforts – so you can trust me on this.

This post is written from a .net perspective, but it can be easily translated to any other environment.

And the big tip is: respect the user preference, remember it may be different (or, in technical terms CurrentCulture, InvariantCulture).

  • Respect the user preference - every string that is displayed to the user or entered by the user should be formatted and parsed using CultureInfo.CurrentCulture, that's it, don't try to be smart and never use anything else (especially not the CurrentUICulture or the culture associated with the interface language, those are never the right choice).
  • Remember it may be different - every string that is saved to a file (or registry, web-service or any other form that is supposed to be readable for computers) should be formatted and parsed using CultureInfo.InvariantCulture, that is the only culture that is guaranteed not to change between locals and versions of Windows – that will let you transfer files between countries and let your program read older files after your client upgrade to a new localized version of Windows.

That's it.

posted @ Tuesday, July 3, 2007 11:36 AM

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
Please add 4 and 8 and type the answer here: