|
|||
|
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Silverlight 4 : how to switch language
|
| Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius |
|
||||||||||||||||
| Silverlight 4 : how to switch language - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support | |||||||||||||||||
| Author | Post | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
|
polyright Member
|
Hello, I'm trying Sisulizer with a VisualStudio 2010 Silverlight 4 project. Sisulizer generate dll and xap in a separate folder for each language. Preview is perfect (except DateTimePicker in XAML). 1. How can I change language in the app? I try :
in the app constructor. but that do not change the language. 2. Can I change language by runtime? Is it possible to generate a xap with all language (and not many xap). Thanks
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Markus.Kreisel Administrator
|
Hi, Sorry, there is no way to change the language in Silverlight at runtime. This is a limitation of Silverlight and not Sisulizer. All you can do is to change the language outside your code (e.g. using JavaScript) and force your Silverlight app to reload in the new language. We are trying to find a way to overcome this limitation. Right now we do not have a workaround that is working reliable. Sorry for not having better news Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
polyright Member
|
Hi,This is a limitation of Silverlight and not Sisulizer. This is more because Sisulizer generate separate DLL, come on ! But you didn't answer my first question, how to simply switch to a language at startup? That silverlight auto-select the good DLL and XAP depending by culture? What the best switch method?
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Markus.Kreisel Administrator
|
Sisulizer follows the Silverlight standards. The old Windows resources could be multi-language. But in .NET and Silverlight each language gets its own language DLL. Sorry, but we really can not overcome that limitation. In Silverlight all these languages will be placed in the same XAP file. You can change the XAP extention to ZIP and look into it. You will see that there are sub-folders with the language files in it. The same structure a .NET standalone app will use. To switch the language at start-up you can use this JavaScript in your HTML
The last line might look odd. But it is needed to actually re-load the element. You then call that e.g. from a combo box and a button
After the Silverlight app is started it made the choice which DLL to use and initialized everything using the strings in that DLL. We don't know the reason why Microsoft did not implement a way to switch the languages at runtime in Silverlight. It is an often requested feature... If you find a way how to switch the language - reliable and using MS standards - at runtime in Silverlight don't forget to contact us. We would try to return some favor to you :-) Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Markus.Kreisel Administrator
|
Hi, I send you a PM with a download link to a simple sample of language switch. Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Markus.Kreisel Administrator
|
And last but not least... Don't forget to check: Project - Edit Source - <your source> - File - Multilingual file. This will create one XAP with all the languages you have. The language switch has to be done with the sample code I send you from the surrounding HTML. Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
polyright Member
|
that's rock!
|
||||||||||||||||
| |||||||||||||||||
| Current time is 08:20 am | |
| .NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Silverlight 4 : how to switch language | |
Sisulizer software localization tool - Three simple steps to localize