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
Mixed translations with default language - 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: Tue Feb 9th, 2010 12:21 pm
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Hi,

using Delphi 2007 with Sisulizer2008 (build 296)
*urgent*

Our app currently shows some *mixed* translations when using the default language (ENU) and a windows locale of eg NL. See attached picture.
With the default language, ResourceDLL use should be disabled, but apparently in some cases it gets translations from the resource DLL that corresponds to the windows locale. How can this be ???

TIA
Gerard

Attachment: lang ENU.JPG (Downloaded 52 times)

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 9th, 2010 12:39 pm
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2542
Status: 
Offline
With default language VCL doesn't use  registry settings and used is resource DLL matched with Windows locale, so when you run your application on Windows NL, default language is Dutch when you run this same application on German Windows, default language is German. This means if you have system locale German (Germany) VCL will search for DEU. If the exact match does not exist then VCL tries to load country neutral resource DLL (e.g. DE instead of DEU). Otherwise VCL does not load DLL but uses the resources of EXE.

You can read more about language runtime in this Jaakko's PDF document about localization for VCL platform: http://www.sisulizer.com/software-localization-tool/vcl.pdf


Janusz



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

 Posted: Tue Feb 9th, 2010 01:07 pm
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Hi Janusz,

I know how it is supposed to work, and you have even implemented a fix to circumvent some undesirable behaviour (see answers to my question in this same forum of jan 5th, 'default language and LoadedResourceLocale').

However, what I now see is a *mixed* picture with the default language: most strings are left alone (as you say, 'uses the resources of EXE'), but *some* strings *are* translated. That worries me greatly. Can you please look into it?

TIA
Gerard

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 9th, 2010 01:22 pm
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Perhaps I should add that I added the following code to the Initialization of the main form:

---------------------------------------------------------------
RegisteredLanguage := GetDefaultLocaleReg(ParamStr(0), LangKeyExists);
if LangKeyExists and (RegisteredLanguage = '') then
begin
DisableResourceDllUse;
LoadedResourceLocale := sDefaultLangCode; //=ENU
end;
---------------------------------------------------------------
This code is supposed to suppress the loading of a resource DLL corresponding to the windows locale. But perhaps at that moment some strings have already been translated??

Gerard

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 9th, 2010 05:21 pm
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2542
Status: 
Offline
Hello,

However, what I now see is a *mixed* picture with the default language: most strings are left alone (as you say, 'uses the resources of EXE'), but *some* strings *are* translated. That worries me greatly. Can you please look into it?
VCL use exe resources if application directory doesn't contain resource DLLs. However, if there is Duch DLL, VCL automatically load this DLL. Seem to me that in your case loaded is DLL matched with Windows locale (NL), and "mixed" translations are results of missed translations in this DLL, so probably:
- some Dutch items aren't translated in Sisulizer's project
- you haven't enabled to localization this VCL item

Perhaps I should add that I added the following code to the Initialization of the main form:
Hmm... I'm not Delphi developer, however, I hope Jaakko and Ilkka can answer on this your question.

Janusz



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

 Posted: Wed Feb 10th, 2010 07:11 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 801
Status: 
Offline
Could you Private Upload your EXE-file, dutch DLL-file and SLP-file. I will take a look of them.

Ilkka



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

 Posted: Wed Feb 10th, 2010 07:23 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 801
Status: 
Offline
Is that warning dialog your own made or is that some system dialog?

By own made I mead that you created a form (DFM-file) into Delphi project and added the TLabel, TCheckBox and the TButton to the form.

If that is a system function, could you show the pascal-code.

Ilkka



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

 Posted: Thu Feb 11th, 2010 08:26 am
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Hi Ikka,

it is just a regular MessageDialog; the message itself as shown (in Dutch) is a resourcestring. So it seems dfm-stuff doesn't get translated, resourcestrings are (though I can't be sure whether this is *always* true).


Perhaps I should make my point more clear. My problem only concerns the following specific situation: Sisulizer standard language is American English; Windows locale is Dutch (or any language other than the standard language). In this situation, when I choose any language but the standard language, things are OK. However when I choose the *standard* language, the *Dutch* translation is shown instead. I can't explain that to our customers!

So the point is not that the Dutch translation is defective in any way! It is that I don't want translations from the windows locale-resource when I in fact select the *standard* language. That's the reason for the little initialization code that should disable any translations to be made at the start. Unless of course the resource strings have already been translated *before* that initialization.

This is a real problem! Also it should be easy for you to reproduce. Hopefully you can give a solution. Unless of course Delphi is to blame.

TIA
Gerard

Back To Top PM Private Upload Quote Reply

 Posted: Thu Feb 11th, 2010 08:47 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2542
Status: 
Offline
HI,

Seem to me that here can be used Windows message. So, when you use English language in your application, this message is still in Dutch language. Can you check this behavior with other Windows locale OS e.g. on German Windows, French Windows etc.?

Janusz




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

 Posted: Thu Feb 11th, 2010 08:58 am
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Yes certainly.

When I have selected the default resource (American English), no resource should be loaded. Instead, always the windows locale-resource is loaded! If I set the windows locale to French, it will be the French resource.
See attached picture.

Gerard

Attachment: lang ENU-Fr.JPG (Downloaded 41 times)

Back To Top PM Private Upload Quote Reply

 Posted: Thu Feb 11th, 2010 09:21 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2542
Status: 
Offline
Hi Gerard,

I hope our Delphi experts (Ilkka or Jaakko) will find some advice for you how change it in your Delphi application.

Best,
Janusz



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

 Posted: Thu Feb 11th, 2010 09:57 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


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

Just to make sure. Do you use Sisulizer's classes to change the language at runtime?

The VCL loads strings automatically before any code is executed. If you then try to change the language in code you have to attach the translations to all the application. Our classes for runtime language change will do that. Do you use them?

You should also be aware that system dialogs in Windows always follow the language of the Windows GUI. E,g, the file open dialog is one of these. But there are many others. This mean, that you can set some strings in them but not all. This is a limitation in Windows. Please check that your dialogs are not one of this type. If you look at Sisulizer you will see that it comes with an own file open dialog so we have the full control over its localizability.

Hope this helps

Markus



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

 Posted: Thu Feb 11th, 2010 11:46 am
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Marcus,

yes I do.

To make it more convincing, I tried to reproduce it with your own examples, in this case the \Vcl\DelphiWin\CommonDialog example.

Indeed same issue there! See attached. I chose English (= original language) and had French as windows locale. If you look at the contents of the combox, you'll see that those resourcestrings for which I entered French translations are indeed translated to French.

I hope this is convincing enough ...

Gerard

Attachment: CommonDlg example.JPG (Downloaded 34 times)

Back To Top PM Private Upload Quote Reply

 Posted: Fri Feb 12th, 2010 12:02 pm
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 2542
Status: 
Offline
Hi Gerard,

Could you send to us your exe or some binary example via private upload form for analyze this issue?

Janusz



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

 Posted: Fri Feb 12th, 2010 12:13 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 2115
Status: 
Offline
btw: The sample program you gave as proof works fine here on my German Windows. We have to check your application on our systems to find out if is an issue related to your Windows installation.

Markus



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

 Posted: Fri Feb 12th, 2010 12:33 pm
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Privately uploaded the ComnmonDialog Delphiwin example project.
The issue (translations according to windows locale, when in fact the original resources of the executable should be used) only presents itself at startup; not after a runtime language change.

Gerard

Back To Top PM Private Upload Quote Reply

 Posted: Fri Feb 12th, 2010 02:09 pm
PM Private Upload Quote Reply
Gs
Member
 

Joined: Tue Nov 18th, 2008
Location:  
Posts: 69
Status: 
Offline
Hi,

for the moment, we have 'solved' the problem by creating one more resourcefile, namely, for the original language (ENU). This resource of course contains no translations at all (but still is just as large as all the others, I wonder why).

Anyway. This way, we are no longer dependent on Delphi VCL trying to interpret a blank setting in the registry and ending up with translations according to windows locale where one really wanted to select the standard (ENU-)language..

Not very elegant and a waste of space, but it works.

Gerard

Back To Top PM Private Upload Quote Reply

Current time is 08:54 am  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Mixed translations with default language



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