NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on April 01, 2018, 04:31:38 AM
-
Hi
I'm making a multi language APP. Therefore I need to translate buttons and prompts at runtime. No problem on Forms and menus, but I can't figure out where/how to do it in a Browse.
Any ideas?
Regards Niels
-
Hi Niels,
The Translate Method in the Web Handler is supposed to catch all strings. Is this where you try it? And what exactly is it you want to translate in a Browse Procedure?
Peter
-
Hi Peter
I already use the Translate Method in the webhandler. But my customer would like the buttons (First, Previous, Next, Last, Insert) to be translated individually by each browse.
Regards Niels
-
Hi Niels
I have added my own translation code in webhandler
Like
if ReturnValue = 'Yes' then ReturnValue = 'Ja'.
if ReturnValue = 'No' then ReturnValue = 'Nej'.
Default language is swedish
After that I run all strings through my own translate-function
ReturnValue = Mytranslate(ReturnValue,self.gsv('language'))
The function reads a translation-table keyed on the deafult language and returns the calue based on the sessionvalue on language
This takes care of all strings.
:: rainer
-
Hi Niels,
can you expand on this a bit please;
>> I already use the Translate Method in the webhandler. But my customer would like the buttons (First, Previous, Next, Last, Insert) to be translated individually by each browse.
What do you mean by the word "individually" ?
Cheers
Bruce
-
Hi Bruce
My customer would like to have an insert button named "New Customer" on the customer Browse and "New Item" on the Item Browse.
Makes sense?
Ragards Niels
-
sure you can do this.
you're gonna embed in the GenerateUpdateButtonsAbove and GenerateUpdateButtonsBelow routines.
You change the text the same way you change the SaveButtonText on a login screen.
p_web.site.InsertButton.TextValue = 'New Customer'
Cheers
Bruce
-
Thanks.
I'll try.