Storing language elements in special section of an ini file

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Bytejaeger
Posts: 3
Joined: Sun Aug 14, 2005 9:14 pm

Storing language elements in special section of an ini file

Post by Bytejaeger »

Hi there

I am evaluating several multilanguage tools. I have the requirement to store all translations in a predefined section of an ini file. The customer has 3 separate ini files with the translations of several application. Each application has its own section. So the main application of the customer handles the language switches and changes the name of the ini file (-> extension from .ger -> .ini or from .ita -> .ini).

My question is: how can I do this with your components?

Any solutions are welcome
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,
I can't see a reason for such behavior. Why you can't store translations in separate file (if it is needed to use external translations) independent from application's configuration file?
Anyway, TsiLang components store translations in predefined way (SIL or SIB file) and this couldn't be changed easy anyhow. Both SIL and SIB files can hold multiple forms and, even more, multiple projects but you just must be sure that projects don't have forms with same name.

Just FYI, SIL files are plain INI files and SIB are binary with fast loading and saving speed.
Best regards,
Igor Siticov.
Bytejaeger
Posts: 3
Joined: Sun Aug 14, 2005 9:14 pm

Post by Bytejaeger »

hi isiticov

The reason for this is simple: The customer has one main application with the buttons to switch the application language. All other applications are called from this main application and should not be able to switch the application language itself.

Because usually each application stores its translations on their own way it it near impossible for the customer to handle the translations. He translates most of the text because many subjects are very special. So the requirement to store all strings in one ini file (separate for each language) is born...

the easiest way to solve my problem is an OnRead-event in your component. As parameter the section and the keyword should be defined as var, so I can change the section/keyword for my purpose and the component can then read the strings from the new position in the ini file.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

There are LoadAllFromStream() and SaveAllToStream methods that could be used to load and save translations from custom locations. They accept/store translations in SIL format.

Does this help?
Best regards,
Igor Siticov.
Bytejaeger
Posts: 3
Joined: Sun Aug 14, 2005 9:14 pm

Post by Bytejaeger »

Thanks. That's a possible solution. I will try it on friday (because I have a short holiday... :lol: ).
Post Reply