[html-formfu] Localize value

Octavian Rasnita orasnita at gmail.com
Tue Sep 13 19:35:14 GMT 2011


OK, then if the keys are actually 1, 2, 3 and so on, they don't need to be localized. As usually, they are probably keys in a db table.

The only thing you need to localize are the labels "Yes" or "No" that will be printed on the page, and you can do that with the code you sent to the list.

Octavian

----- Original Message ----- 
From: "Stefan" <catalyst at s.profanter.me>
To: "'HTML Form Creation, Rendering and Validation Framework'" <html-formfu at lists.scsys.co.uk>
Sent: Tuesday, September 13, 2011 3:36 PM
Subject: AW: [html-formfu] Localize value


> Hi Octavian,
> 
> 
> 
>>I don't know if there is a value_loc option for select/radio elements
> because I never needed such a thing, but if there is not, you can get the
> localized value after submitting the form and in the form print just the key
> you want to localize (because the users can't see that key anyway).
> 
> 
> 
> Sorry, I miswrote it a little bit. The value_loc exists for eg the submit
> button. But if I want to localize an options array I have to do it by the
> long way mentioned in the post before. It seems that there is no options_loc
> (Post from 2007:
> http://lists.scsys.co.uk/pipermail/html-formfu/2007-October/000640.html). 
> I need the localization with options to generate localized html code like
> the following:
> 
> <select name="type">
> 
> <option value="1">Anfrage</option>
> 
> <option value="2">Buchung</option>
> 
> </select>
> 
> 
> 
> And
> 
>    # Request type
> 
>    - type: Select
> 
>      name: type
> 
>      label_loc: type
> 
>      options:
> 
>        - value: '1'
> 
>          label_loc: request
> 
>        - value: '2'
> 
>          label_loc: booking
> 
> 
> 
> is doing this job.
> 
> 
> 
> Thanks anyway for your response!
> 
> Stefan
> 
>


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


> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu



More information about the HTML-FormFu mailing list