Re: Is there a way to help gtkmm for website translation?



On Sat, May 1, 2010 at 5:53 AM, Murray Cumming <murrayc murrayc com> wrote:
> On Sat, 2010-05-01 at 02:54 +1000, Tao Wang wrote:
>> There are 3 documents in gtkmm. Based on priority:
>> 1) the first one is the gtkmm website. This is beginning of
>> everything. So, it's more important than others. So, it should be
>> treated as a document.
>
> The website is very simple HTML, using Server Side Includes to avoid
> some repetive HTML. I'd welcome suggestions for making it translatable,
> though it would have to still be simple. I have no interest in
> maintaining a CMS.
>

[ POT generation ]

It's better using pot than copy and modify pages for each language.
Because it is much easier for keeping consistent of different
language. If translator didn't update in time, the original English
string will be shown, other than shown the old information.

I don't know whether the website is using the same way of DocBook xml
to generate the html and ssi. If it is, it would easier to generate
.pot file by xml2po, and using translated po file to generated a set
of html. If not, you can use gettext function in php to do the same
thing. Just simply wrap each readable strings to <?php echo _("Welcome
to gtkmm")?>, and then gettext can extract the strings to form .pot
file.

[ Available for Translators ]

And then you can post the .pot file to l10n.gnome.org or
translationproject.org as "gtkmm-site", so translators will aware
that, and can translate it.

[ URL ]

Visit http://www.gtkmm.org, the site will automatically recognize
user's locale, and if the language is available, then redirect to the
language's page. Otherwise, the default language will be used.

Visit http://www.gtkmm.org/{lang}, such as http://www.gtkmm.org/zh_CN,
will display the specified language pages.

If you are using php+gettext solution, the implementation is very
simple. Just add a parameter to the link, such as
http://www.gtkmm.org/index.php?lang=zh_CN, and then in the php, set
the locale to "zh_CN" as the link specified, and then gettext will
automatically fetch corresponding string from zh_CN.mo file. So, it's
actually not necessary create a set of pages for each locale.

[ Interface ]

For the interface. Based on gtkmm website, right top corner is empty,
so you can put a dropdown list, or a list of flags, or a list of
languages names, to let user select the language. And the left bottom
corner is empty too, you can put a languages list above "Other
Resources". I don't like the interface for choosing language in
"http://library.gnome.org/devel/";, because there are too many
languages, so the list is too long for choose. In such case, a matrix
of language flags will be much helpful for language choosing. So, at
the beginning, a list of language is ok, since their is not so many
languages available.

-- 
Regards

Tao Wang


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