Localization (feedback): default dir structure not obvious from docs given
casaper opened this issue · 5 comments
Hello
The doc didn't tell me that I will usually want to make a source/localizable/index.html.erb
with activate :i18n, langs: [:de, :en, :it, :fr], mount_at_root: :de
in order to really get the right properties from my 'locales/xy.yml` files.
I was trying and trying again with millions of different variants of source/en/index.html.erb
, source/index.en.html.erb
or source/locales/en/index.html.erb
and many different possibilities in config.rb
.
As I'm not competent to document this any better, I do not have a decent suggestion how this could be explained better. But I can tell for sure, that there is and will be others not understanding it in the way it is documented now.
A experienced rails-dev that was helping me, was also taking quite some time to debug his way with pry and step by step to the conclusion that source/localizable/
is not only thought for language specific layouts...
Is this line:
Localizable templates live in the
source/localizable
folder by default (see below on how to change this option). Each template in that folder will have access to theI18n
helper.” from the i18n documentation
…not clear?
Do you think showing a standard directory structure for i18n with Middleman, like we do in “Directory Structure”, would help?
Yes, I think something in that manner would have have lead me to the right structure straight away.
Great. Feel free to submit a PR, otherwise I will look into within the next few days or so.
I'll have to see if I'll have spare time to do so. But my PR may be containing some typos, as english is not my first language.