Is it possible to use java .properties files in a Rails project instead of YAML files? And if so, how do you set this up?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
generally the i18n integration works with YAML files or plain ruby hashes. So you could simply parse the .properties files (I think https://github.com/flergl/java-properties-for-ruby would still do the job, works even still with 1.9.3 at first glance) and convert them to YAML or dynamically parse them in something like:
Of course you might still need to replace placeholder syntax “{0}” to a i18n compatible “#{0}”.
Cheers,
Fred
ps.: BTW check out our service PhraseApp.com we are working on easing the i18n pain!