Re: internacionalization in gtk (souce of information/examples?)
- From: Wolfgang Sourdeau <wolfgang ultim net>
- To: Javier Ros <jros unavarra es>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: internacionalization in gtk (souce of information/examples?)
- Date: Wed, 13 Sep 2000 05:01:10 -0400
La plume légère, à Tue, Sep 12, 2000 at 10:26:06AM +0200, heure d'inpiration,
Javier Ros écrivait en ces mots:
I suppouse this is a bidirectional isuue:
1st- When reading a file into the gtktext, the file string(s) should
be translated to utf8 before being feeded to the gtkwidget.
Yes, but that is the purpose of iconv in this case:
- your native strings should be in english in your program enclosed
between parenthesis and with an underscore
(example: _("This is my english string"))
Provided you have "gettextized" your project a file such as
projectname.pot will appear in $(topdir)/po when running make.
This will be the base of your translation work. Copy this file to
es.po and then edit it. Every strings will have been automatically
extracted so you will only need to write the translation in the
"msgstr" tag of each msgid/msgstr pair.
After it is done, run "iconv -f nativeencofing -t UTF-8 -o es.utf8
es.po". I don't know what the native encoding is for Spanish, for
French it is ISO-8859-1.
Afterwards, just run "msgfmt -o es.gmo es.utf8" and you'll have your
translated version (the es.gmo should be installed in $(localedir)/es/LC_MESSAGES/projectname.mo).
2nd- When writing the contents of the gtktext (a(n) string(s)) to a
file,
it shoud be translated back to the original encoding of the OS.
I don't know the answer here, I haven't tried yet but I would guess so.
Am I right?.
What about the default encodings within the OS?
The default encoding is always ASCII-127 in every OS. Only the OS
internationalisation mechanism changes that, but it has to be enabled.
-----
A concise question:
Asume that I start typing in a gtk widget in win32, and that I write the
gtktext string containin the text in a file.
Can this new file be readed without translation in gtktext? (thougt it
should be a UTF8 encoded file.)
I think so yes.
Could you point me to some particular code fragment? (file of gimp for
win32: look for....(I supouse gimp code is too big for me to look
within...))
Are they documented somewhere? (glib reference doc ver 1.2? (does 1.3
ref doc exists?))
run "info gettext" on a GNU system. Everything is nicely documented
there (except for the UTF-8 encoding thing).
---
Thanks a lot (I think, you've driven me the right way)
Well, I hope so.
Wolfgang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]