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
.NET form partially translated - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Mon Feb 1st, 2010 03:47 am
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
I have so far been translating my dot net C# apps in conjunction with me Delphi applications, and the C# code is kept to the same language by setting the locale whenever a form is created.

I now have two C# apps using Windows Forms to which I have added RTLC.  My query is that some of the elements on the form that is open at translation time do get translated, but not others.

Other forms are always translated into the new language

One of the two apps changes languages from the main form, and since this does not change fully with RTLC, then it never shows the fully translated form (if not on OS with same locale)

Is there something I need to do to get the current form to fully translate when doing Windows Forms RTLC?

It looks like only top-level controls on the open forms are being translated...

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 1st, 2010 09:59 pm
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
I confirmed this in a test app.

I also checked the help but don't see any additional steps other than setting the initial culture, and setting the selected culture.

Do I need to run an additional step to get the currently open forms to translated?
Example uploaded...

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 1st, 2010 10:48 pm
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
Something like this seems to 'fix' it.

Someone with more knowledge than me needs to vouch for this and or enhance this to account for things I don't know :-)

In Translator.cs:

private void TranslateControl(Control control, string name)
{
   resources.ApplyResources(control, name);
}


becomes
   
private void TranslateControl(Control control, string name)
{
   if (control.Controls.Count > 0) {
      for (int i = 0; i < control.Controls.Count; i++) {
         Control subControl = control.Controls[i];
         TranslateControl(subControl, subControl.Name);
      }
   }

   resources.ApplyResources(control, name);
}

HTH

Still need advice and solution for load-once type things, as I have found with column headers on a DataGridView for example...

Last edited on Tue Feb 2nd, 2010 01:42 am by bikemike

Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 3rd, 2010 07:42 pm
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
bikemike wrote:
Still need advice and solution for load-once type things, as I have found with column headers on a DataGridView for example...
Anyone help with this?

Back To Top PM Private Upload Quote Reply

 Posted: Thu Feb 4th, 2010 01:26 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 2115
Status: 
Offline
Hi Mike,

I write you a PM.

Markus



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

 Posted: Sun Feb 7th, 2010 04:23 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
bikemike wrote: Something like this seems to 'fix' it.

Thank you. I fixed Translator.cs to handle nested controls. The fix will be in the next build (297).

 
Still need advice and solution for load-once type things, as I have found with column headers on a DataGridView for example...
I am working on this. Can you explain little bit more. What do you mean by load-once type string?

Jaakko



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

 Posted: Sun Feb 7th, 2010 11:29 pm
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
Well, in this case the headers on those columns in the datagridview do not get reloaded even though the Sisu project has those strings translated and in the resources.  Vis, if you restart in the given language, the initial load of the resources allows the header on the column on the datagridview to be shown in the selected language.

so I am assuming that such resources are only applied at load time.

Is there a way to force them to reload?

If not, what is the advised way to get around this problem - it is not as if there is some load-time manipulation being done in custom code, that has to be rerun, which is a case we have many of and have adequately handled with Delphi.  This is discussed in the help on RTLC with Delphi where a message is subscribed post-translation and some code blocks are re-run to bring the strings back up to the post-design state - in the new language.  Here we are talking about strings on components that are not being changed at run time, they are simply not being loaded by the resource loader at run time in RTLC.

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 8th, 2010 07:18 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
Hi

I fixed this. The current Translator class did not translate Columns of the DataViewGrid. I added code to do that. The code is similar as we use to translate MenuStrips. The new class is in build 297.

Jaakko



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

 Posted: Mon Feb 8th, 2010 07:41 am
PM Private Upload Quote Reply
bikemike
Member
 

Joined: Tue Nov 20th, 2007
Location: New Zealand
Posts: 199
Status: 
Offline
Thanks.
You know I'm going to ask when is 297 going to be avail ?  :-)

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 8th, 2010 07:42 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
Tomorrow



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

Current time is 08:47 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > .NET form partially translated



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