Applies To: |
|
Summary: |
I want to create a combo box and have it's
list display in multiple languages. I have entries for
item_one etc in my english.dbf and french.dbf but when I execute
the statement SetLanguage("French",1) nothing happens. I have
set up my code as follows but at runtime the list always displays
as @(item_one), @(item_two), @(item_three).
FormNew("@(Select Item)",20,6,1); |
Solution: |
The solution is to use the
StrToLocalText() Function. Your code becomes as follows.
FormNew("@(Select Item)",20,6,1); The StrToLocalText function above goes to the current local database as set by the SetLanguage function. If the last SetLanguage command was SetLanguage("French",1) then the StrToLocalText function will open the database french.dbf and find the french translations referenced by item_one, item_two and item_three. The french version will then be used when this function is called. Conversely if we had SetLanguage("English",1) then the file english.dbf would be searched. Nb. Also if we used the command SetLanguage("hello",1) then item_one etc, would be searched for in the file hello.dbf. Therefore the SetLanguage function could be used for more than simply converting the display between languages. |
Keywords: |
Related Links
Attachments