Hello,
Most of my projects (BPL and EXE) store strings in resource files (RC). When I use the TsiLang Expert, I cannot find the strings.
What is the correct procedure to import strings stored in an RC file?
Best regards,
Roberto
Resource Files (RC) in C++
Re: Resource Files (RC) in C++
Hello,
If you use only Win32 as a target platform for your project then you can check the following FAQ entry: https://www.tsilang.com/tsilang-faq/#9 (just replace "AnsiString" in the code sample with "string" as this sample code was written in "non-Unicode" times).
In case you need to support others platforms as well then the only way would be to place these strings in the code of some module and translate them as hard-coded strings with TsiLang. So you move strings from RC to C++ and then use some function that will assign their initial values and then translate this function code with TsiLang Expert.
If you use only Win32 as a target platform for your project then you can check the following FAQ entry: https://www.tsilang.com/tsilang-faq/#9 (just replace "AnsiString" in the code sample with "string" as this sample code was written in "non-Unicode" times).
In case you need to support others platforms as well then the only way would be to place these strings in the code of some module and translate them as hard-coded strings with TsiLang. So you move strings from RC to C++ and then use some function that will assign their initial values and then translate this function code with TsiLang Expert.
Best regards,
Igor Sitikov.
Igor Sitikov.
-
- Posts: 5
- Joined: Mon Dec 21, 2020 5:04 pm
Re: Resource Files (RC) in C++
Hello Igor,
Thank you very much for your advice. Using TsiLang Resource Strings Import Wizard worked perfectly.
I still have some confusion on how to put everything together. It seems that I need to create a SIB project for each BPL and one of the main program EXE. Is there a way to combine/merge all into a single SIB? The reason I ask is that I only use one TsiLangDispatcher. If I understood correctly, it should be possible to update translation (even add new languages) just by sending a new SIB. No need to recompile projects.
Best regards,
Roberto
Thank you very much for your advice. Using TsiLang Resource Strings Import Wizard worked perfectly.
I still have some confusion on how to put everything together. It seems that I need to create a SIB project for each BPL and one of the main program EXE. Is there a way to combine/merge all into a single SIB? The reason I ask is that I only use one TsiLangDispatcher. If I understood correctly, it should be possible to update translation (even add new languages) just by sending a new SIB. No need to recompile projects.
Best regards,
Roberto
Re: Resource Files (RC) in C++
Hello Roberto,
Yes, you can save/export all projects into one single SIB file but you have to be sure that ALL forms in all projects have different names, so every form has a unique name in order to have them all inside one SIB file. And then dispatcher and TsiLang components will be able to distinguish and load only the translations that are related to the particular form.
You can check the following article about creating applications translated by users without recompiling:
https://www.tsilang.com/create-user-tra ... lications/
Hope this helps.
Yes, you can save/export all projects into one single SIB file but you have to be sure that ALL forms in all projects have different names, so every form has a unique name in order to have them all inside one SIB file. And then dispatcher and TsiLang components will be able to distinguish and load only the translations that are related to the particular form.
You can check the following article about creating applications translated by users without recompiling:
https://www.tsilang.com/create-user-tra ... lications/
Hope this helps.
Best regards,
Igor Sitikov.
Igor Sitikov.