GetText from specific language

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
alemio
Posts: 1
Joined: Wed Apr 04, 2018 12:02 pm

GetText from specific language

Post by alemio »

Hi,
GetText method returns string constant by TextID depending on ActiveLanguage property.
I need to get text form specific language instead of ActiveLanguage.
How can I do?
Thx
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Just use GetStringValue() method:

Code: Select all

siLang1.GetStringValue(siLang1.Strings, 'YOUR_ID', [LANGUAGE_NUMBER]);
Best regards,
Igor Siticov.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

Hi Support,

and how can we i.e. get the translation for a caption of a component?

i.e. i have a label named mylabel1 with a caption "Save" and this is translated to german as "Speichern".

Now i want to be able to translate the word "Save" in runtime. with silang1.getstringvalue or with silang1.gettext('Save') i get a empty result.

Is there something i'm missing?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Code: Select all

silang1.GetStringValue(siLang1.Captions, 'mylabel1', 1);
will return the value for the first language.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:

Code: Select all

silang1.GetStringValue(siLang1.Captions, 'mylabel1', 1);
will return the value for the first language.
But this was not the question. The question is how can i get a text for the caption of mylabel1 in this case

Code: Select all

silang1.GetStringValue(siLang1.Captions, 'Save', 1);
is not working. I need a way to get a translation for a string which is already translated because it is used as a caption somewhere.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Sorry, but there is no such functionality.
Best regards,
Igor Siticov.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:Sorry, but there is no such functionality.
Any possibility to get such a functionality? We're on subscription and renewed it in the last days. Such functionality will be very good to be able to runtime translate some messages or dynamic created elements ...
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

We will check what could be done in this direction.
Best regards,
Igor Siticov.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:We will check what could be done in this direction.
Thank you very much considering this.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:We will check what could be done in this direction.
Any news when we can expect something?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

We don't have any ETA on this. But this functionality is under development.
Best regards,
Igor Siticov.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:We don't have any ETA on this. But this functionality is under development.
Ok. Waiting for info / update from you.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Sent you an email message. Please check.
Best regards,
Igor Siticov.
microtronx
Posts: 29
Joined: Tue Dec 21, 2010 7:34 pm

Post by microtronx »

isiticov wrote:Hello,

Sent you an email message. Please check.
Thank you very much for this update. It works as expected very good!
Post Reply