Hi Edwin,

I suppose that you're manually adding a resource bundle to a template and not rely on the default resource bundles? The reason why this fails is that l10n tags are only processed at template instantiation time and at print time. If you add a resourcebundle and want l10n tag replacement to be executed right away, you have to call the evaluateL10nTags() method.

Now, in your case this isn't needed. For list labels, you can simply remove the FORM:LABEL blocks and add these values to your properties file instead:
gender:male = Mannelijk
gender:female = Vrouwelijk

Note the colon.

This should 'just work' as there are no surrounding blocks in which l10n tags need to be replaced anymore before constructing the select field.

Best regards,

Geert

I'm trying to have localized values inside a select field, but they are not translated by the engine during template rendering,
is this a bug or am I missing something?

in my template I have:

             <!--V 'FORM:SELECT:gender'/-->
<!--B 'FORM:LABEL:gender:male'--><!--V 'L10N:gender.male'/--><!--/B--> <!--B 'FORM:LABEL:gender:female'--><!--V 'L10N: gender.female'/--><!--/B-->


this is rendered as:

<select name="gender">
<option value="male"><!--V 'L10N:gender.male'/--></option>
<option value="female"><!--V 'L10N: gender.female'/--></option></ select>

If I put the localized values anywhere else in the template they are being replaced by the correct values from the Resource bundle. As a workaround I converted the L10N values to normal template values and set them in the element, this is
however not very elegant en would like to have a better solution.

Edwin
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

--
Geert Bevin             Uwyn bvba               GTalk: [EMAIL PROTECTED]
"Use what you need"     Avenue de Scailmont 34  Skype: gbevin
http://www.uwyn.com     7170 Manage, Belgium      AIM: geertbevin
gbevin at uwyn dot com  Tel: +32 64 84 80 03   Mobile: +32 477 302 599

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to