I've noticed that in my new Rails 3.0 application all German i18n strings are converted to lowercase (except for the first letter).
When having a string like this:
de:
email: "E-Mail"
the output is always like "E-mail". Same story with all the other strings - uppercase letters within a sentence are auto-converted to lowercase.
Is this default behaviour that I have to disable, or is there any other problem? I have successfully set the locale correctly, as these strings to actually work.
Thanks for your help
Arne
Got the same issue. solved it by adding the _html
suffix to the I18n translation key. it seems that using this suffix suppresses the humanize
usage.
There should be no modifications to the content you specify as part of the internationalization process. It sounds like something is calling humanize
on the string before it is output. Some of the standard Rails form helper methods do this I believe. If you just output the translation using t('email')
you should see 'E-Mail' correctly.
Update: From your comments it seems like it is a label that is causing the problem. If you explicitly specify the text for the label rather than relying on the default behaviour you will get the translation exactly as you specify. So,
<%= f.label(:email, t('email')) %>
should generate the correct label from the translations.
However, it isn't ideal. I think you may also run into problems with the generated validation error messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With