Im new to rails and trying to internationalize my app with I18n. In the locales yaml file for the spanish version im trying to set up the translations as follows:
es:
categories: "Categorias"
home: Inicio
live_casino: "Casino en Vivo"
sportsbook: Deportes
This works like a charm, but as soon as I add the accent in the spanish word like this:
categories: "Categorías"
Rails gives me the following error:
I18n::InvalidLocaleData in WelcomeController#index
can not load translations from .../config/locales/es.yml: #<Psych::SyntaxError: (.../config/locales/es.yml): invalid trailing UTF-8 octet at line 1 column 1>
Ive tried everything ive found in the web and nothing has worked please help!
File/Re-open With Encoding/UTF8
, then saving the file. YAML load then worked. Before I changed it, the checkmark in the menu was onISO-8859-1 (Latin 1)
. – Overwhelm