I am accessing the I18n.locale variable to determine the language and I have to convert it to a string to do comparisons all the time.
I18n.locale.to_s
As in
I18n.locale.to_s == "en" ? "h2-high-quality.gif" : "h2-high-quality-fr.gif"
Am I doing something wrong or is this the way it must be done?
I18n.localeis a symbol. You don’t need to convert to string to do comparisons, rather just do a comparison against a symbol: