NetTalk Central

Author Topic: Multi Language APP  (Read 6179 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Multi Language APP
« 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

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Multi Language APP
« Reply #1 on: April 02, 2018, 01:39:12 AM »
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

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Multi Language APP
« Reply #2 on: April 08, 2018, 11:49:43 PM »
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

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Multi Language APP
« Reply #3 on: April 09, 2018, 01:20:46 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi Language APP
« Reply #4 on: April 09, 2018, 10:31:30 PM »
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

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Multi Language APP
« Reply #5 on: April 12, 2018, 04:11:17 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi Language APP
« Reply #6 on: April 12, 2018, 06:12:22 AM »
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


Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Multi Language APP
« Reply #7 on: April 13, 2018, 03:53:39 AM »
Thanks.
I'll try.