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: Sisusupport, Renate.Reinartz, Markus.Kreisel, Ilkka.Salmenius
New Topic Reply Printer Friendly
Wrong locale (EN) loaded at start if no locale specified in registry - 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 Jul 30th, 2018 03:03 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
I have a strage problem. When I start my VCL application and I have an English resource DLL in my application path, the application starts up in English.

This is the case, when no locale is set in the registry and my default App language is DE and my system locale is also DE.

According to https://www.sisulizer.de/online-help/RuntimeLanguageChangeVcl.shtml, the application should start using the default locale (in my case DE).

Trying to troubleshoot, I check the locale using GetActiveResourceLocale first thing in my dpr file. It tells me, that the active locale is DE.
However, the app starts in English using my English resource DLL. When I remove the DLL, the app starts in DE.

If I set the locale in the registry to DE, my app starts with DE.

Do you have any idea, what could be going on?

Thank you,
Roland

Back To Top PM Private Upload Quote Reply

 Posted: Mon Jul 30th, 2018 05:03 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3165
Status: 
Offline
Perhaps this document helps you better:

https://www.sisulizer.de/translation/vcl/VCL.pdf

The registry method was changed in the vcl. It is better to find and set the best language yourself and allow the customer to switch.

Markus



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

 Posted: Tue Jul 31st, 2018 01:32 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
Thank you, but it is not helpful in this case.

I suspect a Delphi/Windows 10 bug. I created a test app (empty VCL form). Then I created a Sisulizer project with the project exe.
Default sisulizer language is German, my Windows environment is Germany with default language German.

I create an English translation with separate dll.

When I start the app, it starts in English.

My Delphi version is Delphi 10.2 Version 25.0.29899.2631
Windows 10 (1803)

Last edited on Tue Jul 31st, 2018 01:33 pm by altanis

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jul 31st, 2018 02:50 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
It's a Delphi bug. The same happens with the built-in language resource DLL functionality.

Delphi issue:
https://quality.embarcadero.com/browse/RSP-20979

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jul 31st, 2018 03:38 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3165
Status: 
Offline
Thanks for your feedback.

Better set the language yourself from code. And let your customer the possibility to change.

Markus



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

 Posted: Tue Jul 31st, 2018 03:38 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 2010
Status: 
Offline
It is not a Delphi bug but they just changed the feature in Delphi 2010. After that the default locale is the same locale as the UI of Windows. Before 2010 it was whatever locale was set in regional settings.

Ilkka



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

 Posted: Tue Jul 31st, 2018 03:58 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
The locale of my Windows is German, so it must be a bug.

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jul 31st, 2018 04:05 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
Markus,

I agree, this is exactly, what I am doing anyway.

However, there is one issue, which I cannot resolve with this behavior:

If a user of my program starts it for the very first time, there is no entry in the registry. This entry is set by my program. Hence, the very first start will be in English, if this language resource dll is present.
This is independent of the locale settings of Windows, even if it is set to German (using a German Windows version), it starts in English.

Any time after that will be fine, since I was able to set the registry to the system locale in my program.

Roland

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jul 31st, 2018 04:30 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3165
Status: 
Offline
You can change language from code without registry...

Markus



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

 Posted: Wed Aug 1st, 2018 09:30 am
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
How can I do that (without invoking SelectResourceLocale)?

Back To Top PM Private Upload Quote Reply

 Posted: Wed Aug 1st, 2018 10:55 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3165
Status: 
Offline
I`m puzzled...
You want to change the language in your application without using the function to change the language?

The VCL is a black box. As Ilkka noted the behaviour was changed with Delphi 2010. Why not show a language select dialog like shown in the samples for the very first run?

Perhaps R&D has some better idea?

Markus



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

 Posted: Mon Aug 6th, 2018 04:17 pm
PM Private Upload Quote Reply
altanis
Member
 

Joined: Mon Aug 8th, 2016
Location:  
Posts: 28
Status: 
Offline
No, this is not what I want.

1. I want my app to start up in the system language, when it runs for the first time
2. I want the user to be able to change the language

Only 1.) has stopped working as described. The application starts in English, if an .EN localization is present. I am trying to find a workaround so that the applications starts up using the system language (without the user having to do anything)

2. is working as intended.

Back To Top PM Private Upload Quote Reply

 Posted: Mon Aug 6th, 2018 05:38 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3165
Status: 
Offline
Hi,
I fear you need to discuss that with Embarcadero. We have no influence on the behaviour of the VCL. We also would prefer that makers of the platform do not break existing code. But as said thats out of our scope.
Markus



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

Current time is 06: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 > Wrong locale (EN) loaded at start if no locale specified in registry



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

Impress - Privacy statement

Sisulizer software localization tool - Three simple steps to localize