Read EXE and Language Resource Files Language ID #61
Replies: 2 comments 1 reply
-
I assume you mean the Application->Version Info->Language value in the project options? You can use the usual functions to read that information (e.g. my amVersionInfo unit). Let me know if you need help with that.
I assume that by language file you mean the generated language modules. The language modules does not contain any information, apart from the file type, that indicate what language they contain. If you meant the translation project file, then it's just an XML file and you can find a list of the locale IDs inside: <?xml version="1.0" encoding="utf-8"?>
<xlat>
...
<project sourcefile=".\Win32\Debug\HelloWorld.exe" stringsymbolfile=".\HelloWorld.drc" language="1033" properties="45">
<targetlanguages>
<language language="1030" translated="26"/>
<language language="3073" translated="26"/>
<language language="1031" translated="26"/>
</targetlanguages>
... |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the detailed answer, I tried to look up the "Native language" of an executable as defined on the build settings screen as shown above. With the help of the German DP Forum I found two function to read this information. Using this information I can decide if I need to load an external resource for a specific language. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way (function) to read the applications Language ID (if set in the compiler file attributes)?
It would be good for manual localization to be able to check in which language the GUI was created directly inside the code, to decide if looking for a translation file is necessary.
In addition I'd like to know if it's possible to read a language file just as is to check its header also for the language ID, locale name, etc.
This would also simplify the process of manual translation.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions