SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GetText from specific language

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
alemio



Joined: 04 Apr 2018
Posts: 1

PostPosted: Thu Jul 25, 2019 10:32 am    Post subject: GetText from specific language Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Sun Jul 28, 2019 4:56 am    Post subject: Reply with quote

Hello,

Just use GetStringValue() method:
Code:

siLang1.GetStringValue(siLang1.Strings, 'YOUR_ID', [LANGUAGE_NUMBER]);
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Mon Dec 30, 2019 3:31 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Mon Dec 30, 2019 8:24 pm    Post subject: Reply with quote

Code:
silang1.GetStringValue(siLang1.Captions, 'mylabel1', 1);

will return the value for the first language.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Tue Dec 31, 2019 7:13 am    Post subject: Reply with quote

isiticov wrote:
Code:
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:
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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Tue Dec 31, 2019 9:06 am    Post subject: Reply with quote

Sorry, but there is no such functionality.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Tue Dec 31, 2019 9:18 am    Post subject: Reply with quote

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 ...
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Tue Dec 31, 2019 2:17 pm    Post subject: Reply with quote

We will check what could be done in this direction.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Thu Jan 02, 2020 7:21 am    Post subject: Reply with quote

isiticov wrote:
We will check what could be done in this direction.


Thank you very much considering this.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Tue Jan 07, 2020 9:13 am    Post subject: Reply with quote

isiticov wrote:
We will check what could be done in this direction.


Any news when we can expect something?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Tue Jan 07, 2020 1:23 pm    Post subject: Reply with quote

We don't have any ETA on this. But this functionality is under development.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Fri Jan 10, 2020 6:09 am    Post subject: Reply with quote

isiticov wrote:
We don't have any ETA on this. But this functionality is under development.


Ok. Waiting for info / update from you.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2184

PostPosted: Tue Jan 14, 2020 8:47 am    Post subject: Reply with quote

Hello,

Sent you an email message. Please check.
Back to top
View user's profile Send private message
microtronx



Joined: 21 Dec 2010
Posts: 18

PostPosted: Thu Jan 16, 2020 6:36 am    Post subject: Reply with quote

isiticov wrote:
Hello,

Sent you an email message. Please check.


Thank you very much for this update. It works as expected very good!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group