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 

Global strings

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



Joined: 14 Mar 2006
Posts: 22
Location: Canada

PostPosted: Mon Jul 10, 2006 8:40 pm    Post subject: Global strings Reply with quote

Hi,

I have a Delphi application with > 100 forms and units. I like to know if is any way to group together some very common strings (including captions?), so I can use only one occurence instead of one (or more) per form.

In the same idea, if I have one big SIB file including all forms' translations, is there any way to search for a specific string through the entire file?

Thanks,
Ioan
Back to top
View user's profile Send private message Visit poster's website
Haron



Joined: 11 Mar 2004
Posts: 39

PostPosted: Tue Jul 11, 2006 11:51 am    Post subject: Re: Global strings Reply with quote

> is any way to group together some very common strings (including captions?), so I can use only one occurence instead of one (or more) per form.

I doubt it is possible using standard siComponents features. But what about run-time initialization ? Can you create simple procedure that will change Captions and another common strings at form to translated strings using general TsiLang storage / file ?

> is there any way to search for a specific string through the entire file?

Design time ? Run-time ? What problem, I don't understand, sorry.
Back to top
View user's profile Send private message
Ioan



Joined: 14 Mar 2006
Posts: 22
Location: Canada

PostPosted: Tue Jul 11, 2006 12:27 pm    Post subject: Re: Global strings Reply with quote

Haron wrote:
> is there any way to search for a specific string through the entire file?

Design time ? Run-time ? What problem, I don't understand, sorry.


In SIL Editor. For what I now, the Find and Replace functions are enabled only at the Form / Category level (Captions or Strings, etc).
If I have the same string ("user") used as a Label's caption and in some strings too, I want to Find (and maybe Replace) all the occurences.

Haron wrote:
> is any way to group together some very common strings (including captions?), so I can use only one occurence instead of one (or more) per form.

I doubt it is possible using standard siComponents features. But what about run-time initialization ? Can you create simple procedure that will change Captions and another common strings at form to translated strings using general TsiLang storage / file ?

I have many strings repeated again and again in different forms as Labels or strings. I would like to have them translated only once in a common place in the SIB file and the on each form to use the same entry from the SIB.
Of course, I could put them all in the main form and then when create any other form to use the corresponding entry from the main, but with a lot of occurences is difficult to find every occurence (at design time if not at run time).
Back to top
View user's profile Send private message Visit poster's website
Haron



Joined: 11 Mar 2004
Posts: 39

PostPosted: Tue Jul 11, 2006 12:46 pm    Post subject: Re: Global strings Reply with quote

> If I have the same string ("user") used as a Label's caption and in some strings too, I want to Find (and maybe Replace) all the occurences.

Ah, yes, clear now. No, it is not possible to find through different categories.

> I have many strings repeated again and again in different forms as Labels or strings.

Yes, typical case.

> I would like to have them translated only once in a common place in the SIB file and the on each form to use the same entry from the SIB.

It is only possible if you implement run-time initizaliation. Since component translation is much more than only text (but also char set, font, etc), it is not *flexible* to use single SIB for all forms. But nobody prevent you to load text from central storage if found there (override local translation).
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Tue Jul 18, 2006 6:49 am    Post subject: Reply with quote

Hello,

Sorry for delay with reply.
For "auto" translation of many similar terms you can use Dictionary Manager:
1. Just add terms to Dictionary Manager.
2. In SIL Editor select Top-node in the left Tree.
3. Select in menu Tools | Dictionary | Auto-translate
This will translate all sub-nodes of selected tree-node.

To use some "global run-time" storage for common translations you may take a look at resource strings translations with TsiLang:
1. You declare your global strings as resourcestring in some unit which will be used by others.
2. Using TsiLang Resource Strings Wizard you import these strings to TsiLang and translate them in Translation Editor.
3. Later at run-time each time you will refer to these resource strings TsiLang will automatically translate them.

Please let me know if this helps.
Back to top
View user's profile Send private message
Ioan



Joined: 14 Mar 2006
Posts: 22
Location: Canada

PostPosted: Tue Jul 18, 2006 12:19 pm    Post subject: Reply with quote

Thanks, Igor.
Good to know both methods.
Ioan
Back to top
View user's profile Send private message Visit poster's website
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