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
How to find which language is compiled a localized file? - 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: Fri Mar 2nd, 2012 04:21 pm
PM Private Upload Quote Reply
Eugene
Member
 

Joined: Fri Oct 14th, 2011
Location:  
Posts: 9
Status: 
Offline
Hi,

Once an exe file has been compiled as several exe, once for each language,
how can the program know in which language it is translated ?

Thank you

Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 2nd, 2012 08:20 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1341
Status: 
Offline
You can see the language in two ways

1) When Sisulizer creates localized EXE file it writes each EXE into a language specific sub directory. For example if you original fiel is C:\Files\Application.exe the French EXE will be in C:\Files\fr\Application.exe

2) Each resource in EXE can have language tag. EXE's created by Visual Studio typically has a language tag. If your original EXE is in English then the language tag of each resources are most likely English (LANG_ENGLISH). When Sisulizer creates a localized EXE it replaces the resources with localized resources. In this process it also updates the language tag to match the target language. So C:\Files\fr\Application.exe will have French (LANG_FRENCH) language tags in resources.

You can view the languge tags with any application that can show resources of EXE. If you have Visual Studio just open the EXE into VS and view the resources.

Ilkka



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

 Posted: Fri Mar 2nd, 2012 08:42 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1341
Status: 
Offline
If your application (EXE) wants to find on runtime what is the language you have few choices

1) Read the language tag of a resource to find the language. See <sldir>\VCL\LaResource.pas for GetFormLocale fucntion. It is a function that gets the language tag from RT_RCDATA. If you use C++ you can convert that Pascal code to C++ and replace RT_RCDATA with RT_DIALOG

2) Another choice is to adda resource string and give it initial value of language code. So original English EXE would contains en. That string will apper into Sisulizer project and you can translate it to fr, es, de, ... On runtime you can read the value to find out the language.

Ilkka



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

 Posted: Fri Mar 2nd, 2012 09:08 pm
PM Private Upload Quote Reply
Eugene
Member
 

Joined: Fri Oct 14th, 2011
Location:  
Posts: 9
Status: 
Offline
Hi,

Thanks for the quick response.

I Use Delphi 2007 and GetFormLocale always return 0, but your idea of testing a resource string of my own not shown anywhere is great.

Thanks a lot for the tip.



Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 2nd, 2012 09:19 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1341
Status: 
Offline
Eugene wrote: I Use Delphi 2007 and GetFormLocale always return 0, but your idea of testing a resource string of my own not shown anywhere is great.

This is because Delphi does not set the language tag of a resource item. Because the original reosurce does not have the tag Sisulizer by default does not add it either. However you can make Sisulizer to add the language tag. See the screenshot. After that GetFormLocale will return the right language code.

Ilkka

Attachment: Untitled.png (Downloaded 11 times)



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

 Posted: Mon Mar 5th, 2012 01:46 pm
PM Private Upload Quote Reply
Eugene
Member
 

Joined: Fri Oct 14th, 2011
Location:  
Posts: 9
Status: 
Offline
Thank you very much, it works!

Back To Top PM Private Upload Quote Reply

Current time is 09:51 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > How to find which language is compiled a localized file?



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