I have translated the GnuCash website to zh_CN.

Tao Wang dancefire at gmail.com
Wed May 5 13:56:44 EDT 2010


On Wed, May 5, 2010 at 11:44 PM, Geert Janssens
<janssens-geert at telenet.be> wrote:
> On Sunday 2 May 2010, you wrote:
>>
> Ok, I have integrated your patch in the gnucash website. The default language
> is now chosen based on the browser's HTTP_ACCEPT_LANGUAGE field. When clicking
> on a language in the header, this language is preferred.
>

Yeah, excellent. I visit http://www.gnucash.org/ a few minutes before
I read this email, and suddenly found everything is Chinese, and it's
automatically, I'm so happy.

And I found the search page for maillist of Chinese is not working,
which is "https://lists.gnucash.org/search/zh_CN/-".  I got same kind
of result by click other languages in the header.

> If you like, you can change the language in the header to use native glyphs
> (like Japanese does). This information is in externals/header.phtml

I attached the patch for update the link in externals/header.phtml.

>> And one more question, why not use parameter for different language?
>> such as http://www.gnucash.org/index.phtml?lang=zh_CN. So that
>> sub-directories for different languages is not necessary anymore. Only
>> one set files is required.
>>
> I never wrote the original code, but I can imagine some motivations:
> * gettext requires a directory per language for the translations file, so the
> directory was there already to begin with
> * when using a parameter to set the language instead of using directories, all
> the devs must remember to include it in each new link they add to the
> webpages. This can easily be forgotten
> * setting up the directory is only required once per language. Of course, if
> completely new pages are added, this would require a link to be added in each
> language directory as well. But the website is fairly static, so this hasn't
> happened for quite some time.
>
> While examining the code, I discovered a user can use this to override the
> language setting. But it's not added to the links by php, so you will have to
> redo this for each page you visit. Not really handy, but it's there...
>
> Geert
>

I will think about it and have a try to see how far I can go.

-- 
Regards

Tao Wang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash_web_update_chinese_link.patch
Type: application/octet-stream
Size: 782 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100506/84df6d7c/attachment.obj>


More information about the gnucash-devel mailing list