Project Localizer - An Interesting way to Localize your Project
Code Project - Project Localizer
"Project Localizer is a tool to localize any kind of source file. What does it mean, exactly? The tool does two things:
- Replaces all strings in a source file with a specified expression, e.g.
MessageBox.Show("I like you.");becomesMessageBox.Show(localizer["ILikeYou"]); // XML localizerorMessageBox.Show(localizer.ILikeYou); // hard-coded localizer- Generates localizer files in any programming language using a predefined template, e.g. an XML file:
<localizer>or a hard-coded localizer:
<language name="English">
<string id="ILikeYou">I like you.</string>
</language>
</localizer>interface ILocalizer...etc.
{
string ILikeYou { get; }
}
class EnglishLocalizer : ILocalizer
{
public string ILikeYou get { return "I like you."; }
}Background
Sometimes a small project suddenly becomes a big project and we want to make it more global. If we were not provident enough to use resource files, we could come across tens of source files full of not localized (likely English) strings inside. So, we set our shoulder to the wheel and start to rewrite the whole code... Or we use some smart tool, like Project Localizer.
..."
This looks like a pretty interesting (and easy) way to localize a project. Using the XML localizer, it looks like you could easily add additional translations executed by others...
Now to look into a VB language template... ;)
1 comment:
A VB version of this would be very interesting to see.
Post a Comment