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: retrieving text from strings for non-active languag

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



Joined: 28 Oct 2006
Posts: 6

PostPosted: Sat Oct 28, 2006 10:17 am    Post subject: GETTEXT: retrieving text from strings for non-active languag Reply with quote

How can I retrieve the text for a string for a language which is not the current language of the TsiLang conponent?
There is no parameter to specify for which language the result should be returned:
Eg : the form is using language 1, but I want to retrieve a value for a string in lagguage 2 because I want to sent it as a title to a report that is printed in laguage 2.
Is this possible.
I would suggest to extend the GETTEXT function with an optional parameter to specify the language: eg Gettext (ID, language)
If no language-parameter is specified, the active language of the TsiLang-component should be used.
Greetings
Johan
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Sat Oct 28, 2006 1:42 pm    Post subject: Reply with quote

You can use
Code:
    function GetStringValue(const AStrings: TStrings; AName: Tstring; ALang: Integer):
      Tstring;

Use siLang1.Strings as AStrings, string ID as AName and ALang- language number to return.
Back to top
View user's profile Send private message
jdbacco



Joined: 28 Oct 2006
Posts: 6

PostPosted: Sat Oct 28, 2006 3:08 pm    Post subject: Reply with quote

Thanks
I used SiLang1.GetstringValue( SiLang1.Strings, ID, LanguageNumber)
It works fine.
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