Page 1 of 2

App to create Multi Language Array

Posted: Tue Apr 04, 2023 12:17 pm
by AUGE_OHR
hi,

under Fivewin there i a Function FWString(cSeek)
FWString() use Array for {"EN", "ES", "FR", "PT", "DE", "IT"} Language

but i ´don´t know other than DE or EN so i have to use Google Translate
XB_7to_HMG.jpg
XB_7to_HMG.jpg (35.1 KiB) Viewed 16952 times
Layout have 6 x TEXTBOX and "react" ONENTER to connect to Google
after got Translation for all "other" Language i create a String for Array
LOCAL aTRANSLATE := {}
AADD(aTRANSLATE,{'Next try','Próximo intento','Prochain essai','Próxima tentativa','nächster Versuch','Prossimo tentativo'})
AADD(aTRANSLATE,{'yes that's how it works','si asi es como funciona','oui c'est comme ça que ça marche','sim é assim que funciona','ja so geht es','si è così che funziona'})
AADD(aTRANSLATE,{'and now','y ahora','et maintenant','e agora','und nun','e adesso'})
AADD(aTRANSLATE,{'further','más','plus loin','avançar','weiter','ulteriore'})
AADD(aTRANSLATE,{'return','devolver','retour','retornar','zurück','ritorno'})
AADD(aTRANSLATE,{'forward','adelante','avant','avançar','vorwärtz','inoltrare'})
AADD(aTRANSLATE,{'go to','ir a','aller à','Vá para','gehe zu','vai a'})
AADD(aTRANSLATE,{'7 in one fell swoop','7 de un solo golpe','7 d'un coup','7 de uma só vez','7 auf einen Streich','7 in un colpo solo'})
AADD(aTRANSLATE,{'7 Dwarfs','7 enanos','7 nains','7 anões','7 Zwerge','7 Nani'})
AADD(aTRANSLATE,{'Xbase++ after FiveWin','Xbase++ después de FiveWin','Xbase++ après FiveWin','Xbase++ após FiveWin','Xbase++ nach FiveWin','Xbase++ dopo FiveWin'})
but don´t know if those Translation are "good" to understand
also Ampersand, & for Hotkey. also are missing ... "where" to set in "other" Language ...

so when we want to use this Technique for HMG i ask for Help when Language is not DE or EN
i can do the Job for DE when have EN Translation

Comment welcome

Re: App to create Multi Language Array

Posted: Tue Apr 04, 2023 1:49 pm
by AUGE_OHR
hi,

here Source CODE and working App
GOOGLE7_001.zip
(1.55 MiB) Downloaded 312 times
! Note : as always i do NOT provide any Image
there is a *.RC in \RES\GOOGLE7.rc as Sample

Re: App to create Multi Language Array

Posted: Wed Apr 05, 2023 6:53 am
by serge_girard
Thanks Jimmy !

Serge

Re: App to create Multi Language Array

Posted: Wed Apr 05, 2023 3:38 pm
by serge_girard
Jimmy,

Some translations are missing: try this 'Das ist eine sehr gute Nachricht' and my French gives: 'C'est une trŠs bonne nouvelle'

Some adjustment missing?

Re: App to create Multi Language Array

Posted: Wed Apr 05, 2023 7:47 pm
by AUGE_OHR
hi Serge,

i can not confirm it, it look right in my Sample
French_ok.jpg
French_ok.jpg (37.54 KiB) Viewed 16805 times
---

did you compile using Unicode :?:

Re: App to create Multi Language Array

Posted: Wed Apr 05, 2023 7:54 pm
by AUGE_OHR
hi,

can Notepad show UTF-8 :?:

at End of App i have

Code: Select all

  _Execute( 0,, "Notepad","_LOGIT2.TXT",, 5 )
the File "_LOGIT2.TXT" is UTF-8 which i can "check" with NPP

Re: App to create Multi Language Array

Posted: Wed Apr 05, 2023 8:33 pm
by andyglezl
AUGE_OHR wrote: Wed Apr 05, 2023 7:54 pm hi,

can Notepad show UTF-8 :?:

In Win11...
Notepad utf-8.png
Notepad utf-8.png (11.42 KiB) Viewed 16803 times

Re: App to create Multi Language Array

Posted: Thu Apr 06, 2023 8:01 am
by serge_girard
Jimmy,
This is from my _LOGIT2.TXT: AADD(aTRANSLATE,{'This is very good news','Son muy buenas noticias','C'est une trŠs bonne nouvelle','....
S

Re: App to create Multi Language Array

Posted: Thu Apr 06, 2023 9:10 am
by AUGE_OHR
hi Serge,

what is in your Config.INI

i have enable REQUEST HB_CODEPAGE_*** only for "EN","ES", "FR", "PT", "DE", "IT"
it "might" be that it "display" wrong but IHMO Answer from Google should be OK

---

Answer from Google are Unicode but (older) Notepad are just ANSI ... sorry my Error
please try Notepad++ if _LOGIT2.TXT "display" right using UTF-8

Re: App to create Multi Language Array

Posted: Thu Apr 06, 2023 9:45 am
by serge_girard
Hi Jimmy,

config.ini:
Keyboard=1033
Language=EN
Codepage=EN

+ Italian, Spanish and Portugese (and Svenska) are also corrupted.

I added 2 languages: SV svenska and NL Nederlands (Dutch). The dutch and english are OK due to no accents in most cases.

What has Notepad to do with Google answer?

Serge