multiple locales • Strings (dynamic and literal) that can be translated • Strings that may be bidirectional • Dates, times and numbers that can be formatted • is it 123,456.78 or 123.456,78? 3
= Primary-subtag *( "-" Subtag ) Primary-subtag = 1*8ALPHA Subtag = 1*8(ALPHA / DIGIT) • Primary-subtag is an ISO 639 language code and should be lowercase • Subtag is typically an ISO 3166 country code and should be CAPITALIZED • Sometimes you have to wing it 7
#-------------+----------------------------- # id | integer # headline | character varying(255) # abstract | text # body | text # permalink | text # created_at | timestamp without time zone # modified_at | timestamp without time zone class Feature < ActiveRecord::Base translates :headline, :abstract, :body end 15