I'm Taiwanese , I saw most people use 'zh-TW' to represents Taiwan language
but zh-TW contains special character ? so it has strange behavior in rails console.
if I changed my locale to English, it works perfect I18n.locale= :en
But failed to I18n.locale= :zh-TW
NameError: uninitialized constant TW
from (irb):2
from /Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/console.rb:90:in `start'
from /Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/console.rb:9:in `start'
from /Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:62:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Is it a good idea to change the zh-TW to tw for the Taiwan language ?
- zh-TW.yml -> tw.yml
In the locale yml file
tw:
hello: "Hello world"