What's New In The .NET Internationalization Source Code

I wrote a book called .NET Internationalization back in 2006. There is a whole bunch of source code (examples and reusable library code) that accompanies the book that is available for download (you don't need to buy the book to get the source code). I have been keeping the source code up to date with various changes since it was first released and I have just uploaded the most recent version. This blog post describes what's new.

Custom Cultures

I added an example of a new custom culture for Spanish (Chile) Unidad de Fomento, es-CL-CLF, to support the UDF currency in Chile.

Resource Code Generators

I added 3 new code generators for Visual Studio:-

  • JavaScriptResourceCodeGenerator - Creates .js files (JavaScript object literals) from .resx files
  • JavaScriptAddParentsResourceCodeGenerator - Creates .js files (JavaScript object literals) from .resx files, adds all parents except invariant
  • JavaScriptAddAllParentsResourceCodeGenerator - Creates .js files (JavaScript object literals) from .resx files, adds all parents including invariant

Machine Translation

The PseudoTranslator has a new Boolean property, ExcludeMarkup (default is true), where characters that are markup tags (e.g. "<strong>") are not pseudo translated.

The GoogleTranslator is now deprecated because the Google v1 translation API was deprecated by Google in December 2010.

I added Google2Translator for the Google v2 translation API. This is a paid service. See http://code.google.com/apis/language/translate/v2/getting_started.html for details.

Resource Administrator

You can now specify a value for PseudoTranslationCultureInfoName in the App.Config which allows you to change the name of the culture used for pseudo translation.

The GoogleTranslator is no longer used.

The Google2Translator is used if a value for "Google2TranslatorApplicationKey" is set in the App.config file.

If either the MicrosoftTranslator or the Google2Translator are used the remaining translators are disabled (because the Microsoft and Google translators are very reliable).

I fixed a bug where comments were not being preserved in neutral and specific resources when automatic translation was on.

The FileBasedResourcesGovernor now has a new property, Extension, which is the file extension of the files (e.g. ".resx").

ResourceGovernor.ReintegrateResourceSet has various bugs fixed.

Globalization FxCop Rules

I added 2 new rules:-

  • DoNotConcatenateLocalizableStrings - identifies code where resource strings are concatenated (use string parameters instead)
  • ResourceEntryIsNotUsed - identifies properties in Strongly Typed Resource Classes that are not used

Note that the ResourceEntryIsNotUsed class requires the Strongly Typed Resource

Class code to be manually modified so that the CompilerGeneratedAttribute is commented out.

The Translator
I added two new utilities:-

  • ReintegrateResources - a command line utility that intelligently reintegrates resources being sent back from the translator
  • ResourcePackager - a command line utility that ZIPs and unZIPs .resx files being sent to/from the translator


Technorati Tags: ,

Currently rated 3.1 by 9 people

  • Currently 3.111111/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Monday, March 12, 2012 at 4:19 PM
Categories: .NET Internationalization Book | Internationalization
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

Related posts



Friday, April 13, 2012 6:05 PM


Pingback from msprogrammer.serviciipeweb.ro

friday links 25 « A Programmer with Microsoft tools