Imposible to use i18n
aksld opened this issue · comments
Hello,
It's imposible to use i18n.
My structure :
- locales
- en.yml
- fr.yml
- source/localizable
- index.html.md
In my config.rb I add : activate :i18n
After run docker :
File Not Found
/
Hi I'm using i18n and have my index files using .html.erb
suffix.
Here's what I followed when implementing i18n: https://middlemanapp.com/advanced/localization/
@aksld Did you find a solution? I'm running into the same issue.
I adjusted the Docker serve commands to also include the locales, config.rb and other files.:
docker run --rm --name slate -p 4567:4567 -v $(pwd):/srv/slate slatedocs/slate serve
The output in the build directory looks fine. Also it deploys just fine via GitHub pages. Just on serve I get
Changing the index.html.md
to .html.erb
as @dextertd suggested did not help.
It does not show any errors. So I have nothing to go by at the moment.
Okay, I found my issue.
In the config.rb
I did put the i18n config within the configure :build do
without thinking about it. This made i18n only work on build
but not on serve
.
I did put the config now between those lines:
set :relative_links, true
# Internationalization support
activate :i18n, :mount_at_root => false
redirect "index.html", :to => "en/index.html"
# Build Configuration
configure :build do
Now it works.
I have my version with internationalization fully working available here: https://github.com/Spenhouet/beautiful-docs
I hope this helps.
@aksld does the above solve your issue?