Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius
New Topic Reply Printer Friendly
Silverlight sample solution which changes language on runtime - Usage - Three simple steps to localize - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Tue Feb 9th, 2010 03:47 pm
PM Private Upload Quote Reply
skliamis
Member
 

Joined: Tue Feb 9th, 2010
Location:  
Posts: 15
Status: 
Offline
Where can i find a simple Silverlight sample solution which changes the language of the page on run time.

The sample under "C:Program FilesSisulizer 2008NetSilverlightConverter" seems not to do this!

Can i do this in the codebehind file of App.xaml.cs or must be done this action in a javascript???


I found an example in the internet but seems not to work. Please see attachment.

I use Sisulizer 2.0.296 and VS 2008

Thank you for your help

Last edited on Tue Feb 9th, 2010 03:50 pm by skliamis

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 9th, 2010 04:02 pm
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
Converter\Bin\Debug\all contains a multilingual Silverlight application. Unfortunately the AppManifest in the sample contains only Finnish. Add German and Japanese and then it works.

You must modify the AppManifest.xaml inside Converter.xap to

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="Converter" EntryPointType="Converter.App" RuntimeVersion="2.0.31005.0">
  <Deployment.Parts>
    <AssemblyPart x:Name="Converter" Source="Converter.dll"/>
    <AssemblyPart Source="fi/Converter.resources.dll"/>
    <AssemblyPart Source="de/Converter.resources.dll"/>
    <AssemblyPart Source="ja/Converter.resources.dll"/>
  </Deployment.Parts>
</Deployment>

I fixed this in the next Sisulizer build (297).

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 10th, 2010 01:47 pm
PM Private Upload Quote Reply
skliamis
Member
 

Joined: Tue Feb 9th, 2010
Location:  
Posts: 15
Status: 
Offline
Hi, i have now also implemented the javascript function CultureChange in my application but when i call this function, always get this error:

Unhandled Error in Silverlight 2 Application ConfigurationGui.Application.xap Code: 4001 Category: ImageError Message: AG_E_NETWORK_ERROR

Here is my function:

  function CultureChange(culture)
        {
            document.getElementById("sl3").settings.culture = culture;
            document.getElementById("sl3").settings.uiculture = culture;
            document.getElementById("sl3").Source = document.getElementById("sl3").Source;
        }


        <object id="sl3" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="ConfigurationGui.Application.xap"/>
          <param name="culture" value="en"/>
          <param name="uiculture" value="en"/>
          <param name="onError" value="onSilverlightError" />
          <param name="background" value="white" />
          <param name="minRuntimeVersion" value="3.0.40624.0" />
          <param name="autoUpgrade" value="true" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
               <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
          </a>
        </object>


It always crashes at the last line!
Here: document.getElementById("sl3").Source =  document.getElementById("sl3").Source;


I get the same error if i start the TestPage.html in the "all" folder and call this CultureChnage function. (In IE i don't see the generated sisulizer header with the language drop down and get the error above. In Firefox this header appears and i get the error above not until i change the language and press the "change" button!)

I must mention here that i have a few Images on my startpage. What can be the problem here?? Should not be translated the page even if there are errors with loading of images or whatever???


Please reply to me if i was not clear enough.

Thank you very much

Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 10th, 2010 03:30 pm
PM Private Upload Quote Reply
skliamis
Member
 

Joined: Tue Feb 9th, 2010
Location:  
Posts: 15
Status: 
Offline
I have now removed all Images from my start page i dont get the errors from the post above anymore.

But i still dont get the translated value!

I have a button on my startpage which shows a message box on the click event like this:

private void ReloadButtonClick(object sender, RoutedEventArgs e)
        {   
            MessageBox.Show(string.Format(
                "CurrentCulture={0}\r\nCurrentUICulture={1}\r\nPmrResources.Culture={2}\r\nPmrResources.MyPopupDialog2={3}",
                Thread.CurrentThread.CurrentCulture,
                Thread.CurrentThread.CurrentUICulture,
                PmrResources.Culture,
                PmrResources.MyPopupDialog2));
        }

Now when i start the TestPage.html which is generated from the Sisulizer i can change the language between english and german in the dropdown. When i click on my reload button above i see that the culture is set correctly by the CultureChange function, but i don't get the translated value of "MyPopupDialog2"(this value is declared in my Resource file "PmrResources"). It is always in english!

I have opened the generated xap file of my apllication and saw that the sisulizer has correct generated two folders "en" and "de". In the "de" folder i have a dll with the correctly translated "MyPopupDialog2" value(i saw this with .NET Reflector)

Can you maybe say me what else i must do in my code to have the dessired result??

Thank you


 

Back To Top PM Private Upload Quote Reply

 Posted: Thu Feb 11th, 2010 03:09 pm
PM Private Upload Quote Reply
skliamis
Member
 

Joined: Tue Feb 9th, 2010
Location:  
Posts: 15
Status: 
Offline
_(at)_Jaakko.Salmenius

Ok thank you. Now is it clear for me why it does't worked. I thought at the beginning that your post concerns only the sample project "Convert", but this was a generally bug!

I am downloading Build 298 :)

Thank you for your fast bug fixing!

Back To Top PM Private Upload Quote Reply

Current time is 06:22 am  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Usage - Three simple steps to localize > Silverlight sample solution which changes language on runtime



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize