linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i18n questions
@ 2004-04-01 10:43 Mihai RUSU
  2004-04-01 14:58 ` Glynn Clements
  2004-04-01 15:05 ` Progga
  0 siblings, 2 replies; 3+ messages in thread
From: Mihai RUSU @ 2004-04-01 10:43 UTC (permalink / raw)
  To: linux-c-programming

Hi

I am developer on a TCP network server project where the server sends some
text messages to clients which are displayed unmodified. I am curently
trying to find out the best way to support different language types
(please note that I have no control over the clients, they are binary only
comercial applications made by organizations with absolutly no relation to
me or my project) . I have read the man pages of gettext family functions.
However they dont seem to me very flexible. Because I can have clients
from different countries connecting to the same server (they send their
"locale"  identification data in the initial packets) I want to be able to
send korean messages to korean users, french messages to french users,
english to english ones etc. As I see it gettext uses the language set
with setlocale. I dont see it as a solution to call setlocale() before
translating every message to send depending on the clients locale. Do I
miss something about gettext ?

Other thing I want is to have the codes compatible with win32 too but I 
guess I can solve that easily by including a gettext lib with the project 
(I saw "gaim" does something like that too).

Another solution whould be to "make my own". For this I have thought to 
take advantage of the already included "CDB" codes in the project (based 
on some tinycdb release) and have "dictionary" files in CDB format, have 
my own translation function, so then Im not restricted to the locally set 
locale as I have read it is with gettext (I can have an API where I send 
the language to translate to in the translation function call). This also 
will automatically enabled me to support WIN32 too (if I wrote my codes 
portably of course ;)). The big disadvantage here whould be that having my 
own format for dictionary files I cannot take advantage of existent 
projects like KBabel to write such dictionary files. Anyone here has a 
pointer to some detalied explanation of the .po and .gpo files (I see in 
"gaim" that .gpo is some "compiled" form) ? Couse I might do some ".po to 
CDB" compiler and go with this solution :)

Thanks!

-- 
Mihai RUSU                                    Email: dizzy@roedu.net
GPG : http://dizzy.roedu.net/dizzy-gpg.txt    WWW: http://dizzy.roedu.net
                       "Linux is obsolete" -- AST

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-01 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-01 10:43 i18n questions Mihai RUSU
2004-04-01 14:58 ` Glynn Clements
2004-04-01 15:05 ` Progga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).