App to create Multi Language Array

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

App to create Multi Language Array

Post 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 16439 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
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: App to create Multi Language Array

Post by AUGE_OHR »

hi,

here Source CODE and working App
GOOGLE7_001.zip
(1.55 MiB) Downloaded 283 times
! Note : as always i do NOT provide any Image
there is a *.RC in \RES\GOOGLE7.rc as Sample
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: App to create Multi Language Array

Post by serge_girard »

Thanks Jimmy !

Serge
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: App to create Multi Language Array

Post 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?
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: App to create Multi Language Array

Post 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 16292 times
---

did you compile using Unicode :?:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: App to create Multi Language Array

Post 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
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: App to create Multi Language Array

Post 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 16290 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: App to create Multi Language Array

Post 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
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: App to create Multi Language Array

Post 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
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: App to create Multi Language Array

Post 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
There's nothing you can do that can't be done...
Post Reply