First time here? Check out the site's "greatest hits" or read a post from the archives. Feel free to leave a comment or ask a question, and consider subscribing to the latest posts via RSS or e-mail. Thanks for visiting!
« Alphabetizing your .NET Resource (RESX) ... | Main | TopDesk: Expose Clone for Windows (and c... »

John Robbins has a great MSDN BugSlayer Article from April of 2004 on Psuedo Internationalization. When you're creating localization-ready applications, but you don't want to go to all the hassle of localizing your ever-changing resources to a specific language, you can create psuedo-internaFile Attachment: Psuedoizer.zip (11 KB)tionalized resources.

These are resources using not only funky characters (to cover more of the character spectrum), but they may be longer (simulating more 'verbose' languages like German).

For example, here's an English language snippet from one of our resource files:

<data name="Accounts.Download.Title">
  <value>Transaction Download</value>
</data>
<data name="Accounts.Statements.Action.ViewStatement">
  <value>View Statement</value>
</data>
<data name="Accounts.Statements.Instructions">
  <value>Select an account below to view or download your available online statements.</value>
</data>

Here's the same snippet Psuedo-internationalized:

  <data name="Accounts.Download.Title">
    <value>[Ŧřäʼnşäčŧįőʼn Đőŵʼnľőäđ !!! !!!]</value>
  </data>
  <data name="Accounts.Statements.Action.ViewStatement">
    <value>[Vįęŵ Ŝŧäŧęmęʼnŧ !!! !!!]</value>
  </data>
  <data name="Accounts.Statements.Instructions">
    <value>[Ŝęľęčŧ äʼn äččőūʼnŧ þęľőŵ ŧő vįęŵ őř đőŵʼnľőäđ yőūř äväįľäþľę őʼnľįʼnę şŧäŧęmęʼnŧş. !!! !!! !!! !!! !!!]</value>
  </data> 

It can still be read as near-English, which means you can localize your ASP.NET application to this funky almost-language and see:

  • Which strings in your application you missed pulling into resources
  • What you application looks like with longer strings
  • If you correctly handle the higher-order character sets

John's article includes a nice WinForms application to "psuedoize" resources. However his code doesn't take into consideration:

  • Resources that include markup like <a href={0}>. It will actually psuedoize the "a href" which will actually break your application. I've changed it to watch for the entering and exiting of < >'s and { }'s.
  • There's no command-line version.

I wanted a version to solve both these problems because I want to automatically psuedoize our applications during the Continuous Integration NAnt build. That means, Joe Developer adds a string, and the build will automatically generate psuedo-resources that include them all.

Here's my enhanced I18n Psuedoizer with much respect to John Robbin's original. Psuedoizer.zip (11.03 KB)

Tracked by:
"Hanselminutes Podcast 26 - Globalization/Internationalization with .NET" (Scott... [Trackback]


Contact

Sponsors

Hosting By

On this page...

Tags

Calendar

<January 2009>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

Archives

Google Ads