Hello,
I have a problem with my en.yml file in my Rails project: It's getting waaaaay too big. Is it possible to split the file up into multiple files, like en_labels.yml, en_hints.yml and so forth?
I couldn't find anything so far..
Cheers L.
Hello,
I have a problem with my en.yml file in my Rails project: It's getting waaaaay too big. Is it possible to split the file up into multiple files, like en_labels.yml, en_hints.yml and so forth?
I couldn't find anything so far..
Cheers L.
Take a look at http://guides.rubyonrails.org/i18n.html#organization-of-locale-files
Fred
Ah great, thanks. I just realized it works when I simply split them up like this:
en_forms.yml en_labels.yml etc.
however,
will rails automatically know which one to pic if I f.example add french like this:
fr_forms.yml fr_labels.yml
?
Or do I have to work with the directory structure as described in your link?
Ah great, thanks. I just realized it works when I simply split them up like this:
en_forms.yml en_labels.yml etc.
however,
will rails automatically know which one to pic if I f.example add french like this:
fr_forms.yml fr_labels.yml
My understanding is that rails doesn't care in the slightest what the files are called, it's only the data in side that matters ie putting
en: title: 'Hello world'
in fr.yml
and
fr: title: 'Bonjour'
in en.yml would be fine (although rather confusing)
Fred
Yes, I think you're right about the meaninglessness of the filename.
Okay, another problem solved.
Thanks, Fred!