Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bilingual application (French/English) advice required
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Bilingual application (French/English) advice required
Miscellaneous
Thread ID:
00334719
Message ID:
00334719
Views:
60
We have a French application actually in use in Canada, France, Guadeloupe and Suisse.
We are seriously considering to make this application also available in English.

There are several approach to solve the matter and I would appreciate any advice so I can find the most pratical solution to make a bilingual software.

1. I could harcode:
IF APP="FRENCH"
   @2,1 SAY"Nom du Client:"
ELSE
   @2,1 SAY"Client's Name:"
ENDIF
@$,$ GET m.NAME

IF APP="FRENCH"
   @3,1 SAY"Adresse      :"
ELSE
   @3,1 SAY"Address      :"
ENDIF
READ 
2. I could...;
IF APP="FRENCH"
   @2,1 SAY"Nom du Client:" GET m.NAME
   @3,1 SAY"Adresse      :" GET m.ADR
ELSE
   @2,1 SAY"Client's Name:" GET m.NAME
   @3,1 SAY"Address      :" GET m.ADRE
ENDIF
READ
3. I could...;
IF APP="FRENCH"
   DO GET_FRENCH && Get separate .PRG with all the get's
ELSE
   DO GET_ENGLISH   
ENDIF
READ
4. I could have one LC.dBF (Language Code) with several fields, one per language;
Code      French                       English
========= ============================ ==============================
CLTNAME   Nom du Client:               Client's Name:
CLTADDR   Adresse      :               Address      :
ERRMESS1  Ce champ ne peut etre vide!  This field must be filled

@2,1 SAY FREP("CLTNAME") GET m.NAME
@3,1 SAY FREP("CLTADDR") GET m.ADRE
READ

PROCEDURE FREP && Field Replacement
PARAMETERS FLDCODE
SELECT LC       && we assume LC is opened/ordered by Code
IF SEEK(FLDCODE,"LC")
   WFLD=IIF(APP="FRENCH",LC.FRENCH,LC.ENGLISH)
ELSE
   WFLD="???"
ENDIF
RETURN
5. I could have two dBF, one for each language.
Like LFC.dBF (Language for French Codes) with only two fields and LEC.dBF (Language for English Codes).
LFC.dBF
-------
Code      Desc
========= ============================
CLTNAME   Nom du Client:              
CLTADDR   Adresse      :             
ERRMESS1  Ce champ ne peut etre vide!


LEC.dBF
-------
Code      Desc
========= ============================
CLTNAME   Client's Name:
CLTADDR   Address      :
ERRMESS1  This field must be filled


@2,1 SAY FREP("CLTNAME") GET m.NAME
@3,1 SAY FREP("CLTADDR") GET m.ADRE
READ

PROCEDURE FREP && Field Replacement
PARAMETERS FLDCODE
IF APP="FRENCH"
   SELECT LFC       && we assume LC is openend/ordered by Code
ELSE
   SELECT LEC
ENDIF
SEEK FLDCODE
RETURN IIF(FOUND(),DESC,"????")
5. And I could obviously make two separate version.
One french and one English.


Which solution is the best one?
Any other suggestion to make?

Thanks in advance.
Réal Philippon
www.ultra.ca
Next
Reply
Map
View

Click here to load this message in the networking platform