开发者

Tornado translation facility and javascript

开发者 https://www.devze.com 2023-04-11 20:27 出处:网络
I am trying to make a bilingual website (English & Greek). I am using tornado and I put global function _() in my templates. The translation 开发者_C百科comes directly from a .csv. Everything is f

I am trying to make a bilingual website (English & Greek). I am using tornado and I put global function _() in my templates. The translation 开发者_C百科comes directly from a .csv. Everything is fine in html so I can write {{_("Hello")}} and if the user locale is Greek the word "Hello" is translated in Greek. However, I have no idea how to do the same thing in javascript. For example:

foo.html("Hello") 

I dont know how to enable javascript to work with Tornado localization.

Thanks


A friend of mine suggested these two plugins:

1) http://recursive-design.com/blog/2008/02/21/jquery-i18n-translation-plugin/ 2) http://keith-wood.name/localisation.html

Probably we'll use these!

0

精彩评论

暂无评论...
验证码 换一张
取 消