-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preserve i18n locale on non-localized article page #379
Comments
@schlesingermatthias Did you find a solution for this problem? We are running to the exact same scenario. Found a solution 5 minutes later: |
ℹ️ This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
Hi,
I'm having trouble getting localization to work with middleman-blog. I have a localized webpage where all pages are localized using the
t()
helper. I don't want to translate blog posts that's why the articles themselves are not localized.This works pretty well except that the currently used locale is lost on the non-localized article page.
On my localized blog overview page (
/en/blog
or/de/blog
) everything works well.<%= I18n.locale %>
printsen
orde
respectively. The articles on this page link to not localized article pages (blog/2020/03/31/my-article.html
). Inside my article layout<%= I18n.locale %>
always printsen
even if I arrived at the page fromde/blog
.Is there a way to preserve the locale on the article page?
My config:
Or another non-hacky way to use multiple locales with a single article source directory? I tried using multiple blog configs for each language but this does not work with only one source directory and I don't want to duplicate articles for every locale.
Thank you
The text was updated successfully, but these errors were encountered: