Hi,
I'm developing a new website: http://walele.com
I use i18n to translate my site to different languages. But I found
that there is some text can't be collected.
<image src="${_('/static/image/en/logo.png')}" />
I thought _() function can be collected, but fail.
<title> XXXX : ${item.title} </title>
Text with ${} can't be collected, too.
<input type="text" value="Hello world" />
Text in attribute of tags also can't be collected.
Is there any way to let those case can be collected? I use a temporary
method to solve those problem.
localeDict = {
'hello world': _(u'Hello world')
}
And return it in exposed function
return dict(localeDict=localeDict, ....)
So I can use it in template:
<input type="text" value="${localeDict['hello world']}" />
It works, but it is not so good solution to solve that problem, it is
so ugly! Is there any better solution? If not could you please enhance
the i18n module.
Thanks.
Victor Lin.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---