Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with comma in Joomla select list #4890

Closed
thinkerytim opened this issue Oct 21, 2014 · 2 comments
Closed

Issue with comma in Joomla select list #4890

thinkerytim opened this issue Oct 21, 2014 · 2 comments

Comments

@thinkerytim
Copy link

When using the list form field type (http://docs.joomla.org/List_form_field_type) the interpreter seems to fail to properly parse commas:

<field name="number_format" type="list" class="inputbox" label="number format" description="" size="1" default="0">
    <option value="0">19.999,00</option>
    <option value="1">19,999.00</option>
</field>

This results in a select list showing the options like this:

download

@Bakual
Copy link
Contributor

Bakual commented Oct 21, 2014

This is because the list formfield tries to translate the option text. Since the comma isn't a valid constant string, this is stripped and fails.

There are two ways you could solve this:
Either create your own custom formfield which doesn't translate the option texts, or make the options a translated string. The latter would be preferred since the value format you use is language specific already. In Switzerland we would write it as 19'000,00.

If someone wants to write a solution, one could add an attribute to the option (or the field) which says to not translate the options. However I don't know it is worth the effort.

@thinkerytim
Copy link
Author

Thanks Bakual-- I did wonder about that and noticed the language string workaround. I'll just use that for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants