The easiest way to create business applications for the Desktop and the Cloud
With Visual Studio Update 2 we finally added a functionality a lot of you (especially outside the US) have been waiting for, the localization of LightSwitch applications into multiple languages. Until then you had to hardcode a single language into your application. Finally, international companies and companies that are located in countries that use multiple official languages, can provide users with an application in their preferred language.
The concept is simple. For each DisplayName or Description property that you want to localize, you specify a $(ResourceString) instead of the actual string. For each translation, you create a resource file which contains the actual values in the target language. At runtime, we will automatically detect the preferred language based on the user’s browser or operating system setting. In addition to that, strings that you specify on the server, e.g. names for entities or properties, are also propagated to the client, no need to translate them twice. And, you can also localize messages that are created while running business logic on the server or validation rules on the client.
We already published a walkthrough on MSDN which gives you a detailed step by step description. But, there is only one language that everybody in the world understands. It is the language of pictures. I tried to create a visual walkthrough for you guys. Click the picture bellow to start your localization experience (it might take a while to load, there are quite a few pictures in it).
For some reason it doesn’t work as expected, your see strings like “/client/ErrorMessage” or “$(ContactPhone)” in the UI? As so often, the devil lies in the details. In the last part of this blog post I’ll try to summarize the questions and problems that came up most often in our forums:
I tried to keep it a bit shorter this time. As always, use the comments section and our forums for feedback and questions.
- Heinrich Wendel, Program Manager LightSwitch
Vielen dank !
ich bin zwar Engländer, wohne aber im Markgraeflerland. Bin auch 60 Jahre alt !... keep up the great work.
I really like the Parallax Scrolling. It really helped me quickly grasp your message. I will try to start doing that too!
This is a major step. Thanks!
Yes, LightSwitch Team, you all make it again, BRAVO and Cheers!
This is what I have been wait for... Thank You, 谢谢(Chinese), Terima Kasih(Malay),...
How can I localize the OOB validation messages that LS gives?
Thanks for the LightSwitch Develop Team. The Localizing feature is Good but would it also possible to localize the navagator group? I have tried $(Task) but failed :<
Wonderful , but I have a question , is it valid for desktop version -not html based- ? because i have a desktop project that run as web application can I apply this solution on my project?
Yes the same techniques apply to localize the Silverlight client.
I have developed a light switch html client application in Visual Studio 2013 and tried to localize it using the walkthrough (Currently I am in stage where I can see Arabic when the language is changed in the browser settings). I want the app to support English and Arabic. I have two questions.
1> Is it possible for the User to select a language (not from the browser settings) but from a button in the application and we do it programmatically?.
2>If yes, How do I change also the direction from LTR to RTL on the fly , when the user selects Arabic.
@samit - No, I'm sorry but this is not possible. The language of the application is read from the browser.