![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
The table language also needs to support the language you want in it. So you need to pick one that supports cyrillic for the russian one. You may need to have a variety of tables with different language drivers depending on how many languages and what their character sets are. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
What I do is have a routine in my main menu form that checks for the current language setting (assigned by the user on first opening and stored in a setting table). That language has a numeric code. Then my prompt table is opened on the language code index and setranged. Each object has a label ID assigned and a library is called to set the labels on each form as it opens. Since the label is retrieved by integer and the prompts in each language have the same integer for each object, once the prompt table is open and properly ranged to one language, the correct language prompts are assigned. The user also has a change language option once the main form is open. This changes the setting, reranges the prompt table and reassigns the prompts. As other forms open all they have to do is assign the prompts since the language table is already ranged. Basically, you can have have objects assign themselves on opening. On the main menu I use a custom method that assigns all objects because of the need to be able to relable if a user calls the change language option. Obviously this means having object names. In the forms where the objects call their own labels you only need Self.labletext or whatever you are assigning the text to or you can do it the same way as you do your main form. This, for example, would be the call in the main menu in a custom method called in init. TitleBox.text = lbUtils.cmSetPrompt(16) WelcomeTitle = lbUtils.cmSetPrompt(17) tab1.text = lbUtils.cmSetPrompt(18) tab2.text = lbUtils.cmSetPrompt(19) tab3.text = lbUtils.cmSetPrompt(20) tab4.text = lbUtils.cmSetPrompt(21) tab5.text = lbUtils.cmSetPrompt(22) CurrentUserLabel.text = lbUtils.cmSetPrompt(83) ;//Button labels btnCloseForm.labeltext = lbUtils.cmSetPrompt(23) btnOpenProfiles.labeltext = lbUtils.cmSetPrompt(26) btnTextTrans.labeltext = lbUtils.cmSetPrompt(27) btnLUEdit.labeltext = lbUtils.cmSetPrompt(28) btnSwapProfiles.labeltext = lbUtils.cmSetPrompt(66) btnSetUserDefault.labeltext = lbUtils.cmSetPrompt(93) btnUserProfiles.labeltext = lbUtils.cmSetPrompt(154) btnTestTrans.labeltext = lbUtils.cmSetPrompt(163) strBtn1 = lbUtils.cmSetPrompt(133) btnVwR1.labeltext = strBtn1 btnPrnR1.labeltext = strBtn1 strErrorMsg1 = lbUtils.cmSetPrompt(24) strErrorMsg2 = lbUtils.cmSetPrompt(25) strErrorMsg3 = lbUtils.cmSetPrompt(98) strErrorMsg4 = lbUtils.cmSetPrompt(43) The custom method they are calling is simply: method cmSetPrompt(liPromptID Longint) string if tcPrompttext.locate("PromptID",liPromptID) then return tcPrompttext.prompt else Return "Not Found" endif endMethod Denn Santoro President Resource Development Associates http://www.RDAWorldWide.Com Offices in the United States and Germany Providing solutions to health care, business, governments and non-profits since 1982 |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Just out of curiosity, does this add much overhead to opening the form? "Dennis Santoro" <RDAPres (AT) NoRDASpamWorldWide (DOT) com> wrote in message news:4547614A.ECBC0EF5 (AT) NoRDASpamWorldWide (DOT) com... What I do is have a routine in my main menu form that checks for the current language setting (assigned by the user on first opening and stored in a setting table). That language has a numeric code. Then my prompt table is opened on the language code index and setranged. Each object has a label ID assigned and a library is called to set the labels on each form as it opens. Since the label is retrieved by integer and the prompts in each language have the same integer for each object, once the prompt table is open and properly ranged to one language, the correct language prompts are assigned. The user also has a change language option once the main form is open. This changes the setting, reranges the prompt table and reassigns the prompts. As other forms open all they have to do is assign the prompts since the language table is already ranged. Basically, you can have have objects assign themselves on opening. On the main menu I use a custom method that assigns all objects because of the need to be able to relable if a user calls the change language option. Obviously this means having object names. In the forms where the objects call their own labels you only need Self.labletext or whatever you are assigning the text to or you can do it the same way as you do your main form. This, for example, would be the call in the main menu in a custom method called in init. TitleBox.text = lbUtils.cmSetPrompt(16) WelcomeTitle = lbUtils.cmSetPrompt(17) tab1.text = lbUtils.cmSetPrompt(18) tab2.text = lbUtils.cmSetPrompt(19) tab3.text = lbUtils.cmSetPrompt(20) tab4.text = lbUtils.cmSetPrompt(21) tab5.text = lbUtils.cmSetPrompt(22) CurrentUserLabel.text = lbUtils.cmSetPrompt(83) ;//Button labels btnCloseForm.labeltext = lbUtils.cmSetPrompt(23) btnOpenProfiles.labeltext = lbUtils.cmSetPrompt(26) btnTextTrans.labeltext = lbUtils.cmSetPrompt(27) btnLUEdit.labeltext = lbUtils.cmSetPrompt(28) btnSwapProfiles.labeltext = lbUtils.cmSetPrompt(66) btnSetUserDefault.labeltext = lbUtils.cmSetPrompt(93) btnUserProfiles.labeltext = lbUtils.cmSetPrompt(154) btnTestTrans.labeltext = lbUtils.cmSetPrompt(163) strBtn1 = lbUtils.cmSetPrompt(133) btnVwR1.labeltext = strBtn1 btnPrnR1.labeltext = strBtn1 strErrorMsg1 = lbUtils.cmSetPrompt(24) strErrorMsg2 = lbUtils.cmSetPrompt(25) strErrorMsg3 = lbUtils.cmSetPrompt(98) strErrorMsg4 = lbUtils.cmSetPrompt(43) The custom method they are calling is simply: method cmSetPrompt(liPromptID Longint) string if tcPrompttext.locate("PromptID",liPromptID) then return tcPrompttext.prompt else Return "Not Found" endif endMethod Denn Santoro President Resource Development Associates http://www.RDAWorldWide.Com Offices in the United States and Germany Providing solutions to health care, business, governments and non-profits since 1982 |
#8
| |||
| |||
|
|
Long story short, how do I asign a value to an object which name I have within a string variable? |
![]() |
| Thread Tools | |
| Display Modes | |
| |