I built a static application that has a blog configured. I have a languages dropdown from which users can switch the language.
Every article has some tags and when the user clicks on any tag it loads the tag detail page. On the detail page when switching the language the path got a page not found error.
activate :i18n, :mount_at_root => :en, :path => "/:locale", :lang_map => {:en => :""}
I18n.available_locales = [:en, :es, :fr, :jp, :ko, :pt, :ru, :th, :zh, :it]
activate :blog do |blog|
blog.prefix = "blog"
blog.permalink = "{lang}/{year}-{month}-{day}-{title}"
blog.sources = "{lang}/{year}-{month}-{day}-{title}"
blog.layout = "blog"
blog.tag_template = "tag.html"
blog.paginate = true
blog.per_page = 9
blog.page_link = "page/{num}"
end
My paths work like this
http://localhost:4567/fr/
http://localhost:4567/fr/blog
Tag detail page in default language is
http://localhost:4567/blog/tags/announcement/
when I change the language like this
http://localhost:4567/fr/blog/tags/announcement/
Got and error File not Found
/fr/blog/tags/announcement/