fesplugas/rails-translate — pull request #1 by crishoj (2012-09-17 12:23:46+00:00)
Title: Play nicely with mixed-case locales

This change makes the gem play nicely with locale names such as 'zh-CN', by storing with underscores and in lowercase in the database.

Before:

row :'name_zh-CN'
model.attributes[:'name_zh-CN']

After:

row :name_zh_cn
model.name_zh_cn