admi18n usage?

0 views
Skip to first unread message

gasolin

unread,
Jul 31, 2006, 7:11:23 AM7/31/06
to TurboGears
In recent il8n suport(> #1687) I found there's a statement: "admi18n
now works with non-ascii translation"

So I take it a try.

The result? admi18n itself works smoothly, the feature of
"edit translation entries in place", and
"on-line compile"
are awensome.

The admi18n's introduction also looks great, and the document collect
most of infomations for translate strings
http://www.turbogears.org/preview/docs/i18n/index.html
http://www.checkandshare.com/admi18n/


BUT I GOT A HUGE PROBLEM that MISSING the last steps to make the
translation work.

I can't make "cherrypy.session['locale'] = lang" work (In my case
lang="tw"),
nor setup "i18n.run_template_filter = True" on dev.cfg.

I believe there should be something haven updated but not been
documented yet.

Can anyone throw some tips here to make il8n work?


--
Fred

Rune Hansen

unread,
Jul 31, 2006, 8:56:49 AM7/31/06
to turbo...@googlegroups.com
The command you are looking for is turbogears.i18n.set_session_locale(lang)
There are problems with i18n and 09.a8. Elvelind has fixed most of these in trunk and they should make it into the next tg release.

regards
/rune

---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...


gasolin

unread,
Jul 31, 2006, 9:13:28 AM7/31/06
to TurboGears
Thanks Rune,

It works.

The required steps are here:

1. Put "session_filter.on = True" in dev.cfg

2. Put "turbogears.i18n.set_session_locale("tw") " in controller method

regards

--
Fred

Elvelind Grandin

unread,
Jul 31, 2006, 3:45:22 PM7/31/06
to turbo...@googlegroups.com
Nice to hear that it's working. I'll update the doc in the toolbox to
include session_filter.on.


--
cheers
elvelind grandin

Reply all
Reply to author
Forward
0 new messages