[Glade-users] Re: human language support

Havoc Pennington wrote:

Jim Edwards <jedwards inmet gov br> writes:
1. Can someone point me to an example of, or document about,  how to
build a gtk+ gui with multi-language support.

Just read the gettext info pages, GTK works the same as a non-GUI
program basically.

Okay I did it, and I thought it a painful experience :-}

I can now outline the following steps for language support in a new glade
created c application.

1.  Ensure that gettext support is selected in the C Options menu of glade.

2.  Run autogen and make your project.

3.  Go to the po directory and look for a file project.pot where project is
the name of your glade project.

4.  Find the 2 letter code for the language(s) you wish to support and copy
project.pot to ll.po

5.  Edit the ll.po file to and add the correct translations for each msgstr

6.   Edit the configure.in file in your projects top level directory and add
the language code to
      the variable ALL_LINGUAS=""

7.  Rerun autogen.sh to add the new translation to your project.

8.  Install the project.  The translations are searched for in the installed
location and will not be found before that.

 9.  make sure the LANGUAGE environment variable is set to the language code
you wish to test.

I pass this on in the hope that it might be useful to someone else.  You are
certainly welcome to copy it to any appropriate document.
Does anyone know how to make the application see the translations before they
are installed?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]