Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to design applications in the Chinese language?
Message
From
02/05/2006 14:34:36
Walter Meester
HoogkarspelNetherlands
 
 
To
02/05/2006 13:31:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01118425
Message ID:
01118496
Views:
21
Hi tracy and dawa,

I'm not having trouble to put the translations in. As I already said, I've managed to do 5 languages this way. Yes the languages are already stored in a translation table.

My question really is,

1. how I would handle chinese characters and how they should been put in.
2. Does VFP automatically load the chinese DLL?
3. Does it automatically display the chinese characters?
4. What do to with IME?
5. Any other pitfalls or things to think about ?

IOW, I'm a total newbee in creating applications not using western charactersets.

Walter,




>Hi Walter,
>
>If you go to the trouble to do this, then i would consider using a table-driven language converter for your messages and prompts. That way you can set the language at the start of the program and for every message or prompt scan a table for the appropriate language to display.
>
>For instance,
>
>*--Basic example of principle
>CLOSE ALL
>CLEAR ALL
>CLEAR
>SET SAFETY OFF
>SET TALK OFF
>gilang = 2 && Spanish
>
>CREATE TABLE msgs (cid c(16), ilang n(2,0), cmsg c(100), cmsgid c(16), ctitle c(50))
>
>SELE msgs
>INDEX ON ALLTRIM(STR(ilang))+ALLTRIM(cmsgid) TAG cmsglist
>
>APPEND BLANK
>REPLACE cid WITH "0000000000000001"
>REPLACE ilang WITH 1
>REPLACE cmsg WITH "Please enter your name"
>REPLACE cmsgid WITH "11"
>REPLACE ctitle WITH "Instructions"
>APPEND BLANK
>REPLACE cid WITH "0000000000000002"
>REPLACE ilang WITH 2
>REPLACE cmsg WITH "Por favor entre en su nombre"
>REPLACE cmsgid WITH "11"
>REPLACE ctitle WITH "Instrucciones"
>USE IN msgs
>
>*--Display the message
>=MESSAGEBOX(getmsg(.F.,"11",1),0+16+4096,getmsg(.T.,"11",1))
>=MESSAGEBOX(getmsg(.F.,"11",gilang),0+16+4096,getmsg(.T.,"11",2))
>
>CLOSE ALL
>
>RETURN
>
>
>FUNCTION getmsg(qtitle, qid, qlang)
>
>IF TYPE('qtitle') <> 'L'
>   RETURN ""
>ENDIF
>
>IF TYPE('qid') <> 'C' .or. EMPTY(qid)
>   RETURN ""
>ENDIF
>
>IF TYPE('qlang') <> "N" .or. qlang <=0
>   RETURN ""
>ENDIF
>
>qlang = ALLTRIM(STR(qlang))
>
>STORE ALIAS() TO curalias
>
>USE msgs ORDER TAG CMSGLIST IN 0
>
>IF INDEXSEEK(qlang+qid,.t.,'msgs','CMSGLIST')
>   IF qtitle
>      lcReturn = ALLTRIM(msgs.ctitle)
>   ELSE
>      lcReturn =  ALLTRIM(msgs.cmsg)
>   ENDIF
>ELSE
>   lcReturn = ""
>ENDIF
>
>USE IN msgs
>
>IF !EMPTY(curalias) .and. USED(curalias)
>   SELECT (curalias)
>ENDIF
>
>RETURN lcReturn
>
>
>
>
>>A cient asks whether it is possible to translate an application into chinese.
>>
>>I already made the application multilanguage by supporting for english, dutch, french, spanish and portugese. But the latest request is adding chinese, which of course uses a total different character set which is double byte.
>>
>>Can anyone point me in the right direction to adjust the application to translate into chinese ?
>>
>>TIA
>>
>>Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform