[CLOSED] Multi-language with Ext.Net
Hi,
I wondering if there is already a best practice for multi language usage.
Specially for the WebParts. Because, most of them are filled within the Tags (FieldLabel, Title, Text, etc.)
This aims of course also the text parts in the Javascript Code and variables within the Text (different gramar).
With ASP.NET you can only change them proberly from Codebehind by ID.Text = "xyz".
Using or won't work right in some cases. Using these in XScript/JS is also a problem.
In our solution we abstract every Page from a basePage which loops the Ext.Net Controls and
replaces labelIDs in the Tags. For Javascript, we have a hidden asp.net text field dynamically added in Init() with json array which holds labels with strings. In JS we use them like
Code:
#{errorMsg}.setText(getLang("StyleInput",#{language}.getValue()));
basically a port to JS from C#
Code:
string.format("Some Text {0}, with this two {1}","Sample","Variables");
Quite abstract language layer. For LabelIDs in C# we also have enums for VS2010 intelisense.
Before I post the basics of my solution on my blog, I just want to ask if you already have a even better
solution for multilanguage usage.
Cheers.