Yes but...
If you do something like
{{for record in db(...).select():}}{{=T(record.field}}{{pass}}
you get a lot of data added dynamically to the translation files. It
may slow down your app if the db data changes often. It may also
result in lots of data not being translated.
Two options are 1
Hi,
is it possible to translate the output data table using T()?
thank you so much
On Sun, Apr 10, 2011 at 5:45 AM, niknok wrote:
> Beautiful one liner. I have to write an ugly hack to make it work. I
> was forcing the translations because I need to translate certain
> sections only.
>
> def b
Beautiful one liner. I have to write an ugly hack to make it work. I
was forcing the translations because I need to translate certain
sections only.
def babel(lang, s):
# forced translation of Q&A section
T.force(lang)
if type(s)==list:
loc_string=[]
for i in s:
Assuming
options = a retrieved list:string record
then
choices = dict([(x,T(x)) for x in options])
should work. Note: untested.
On Apr 7, 3:29 am, niknok wrote:
> Thanks DenesL.
>
> What if the options are retrieved from a field of list:string type?
>
> On Apr 4, 10:39 pm, DenesL wrote:
>
>
Thanks DenesL.
What if the options are retrieved from a field of list:string type?
On Apr 4, 10:39 pm, DenesL wrote:
> Use
>
> choices = {'Gold':T('Gold'), 'Silver':T('Silver')}
>
> and update your language translations strings.
> Not sure how "answer" is obtained.
>
> On 4 abr, 09:16, niknok w
Use
choices = {'Gold':T('Gold'), 'Silver':T('Silver')}
and update your language translations strings.
Not sure how "answer" is obtained.
On 4 abr, 09:16, niknok wrote:
> I tried:
> Field('color', 'list:string', default=answer,
> requires=IS_IN_SET(T(question['choices']), zero=None, multiple=T
6 matches
Mail list logo