-
Notifications
You must be signed in to change notification settings - Fork 32
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
Redirect same page to different language (link_to) #7
Comments
Hey, I am having the same issue. Have you found a work around? |
I found a workaround. Not sure if it's the most efficient but it works. First create a partial on your layout:
Then include the partial for each view page (model is story)
Hope this helps,
|
As explained in the readme, if a slug in a specific locale is empty, shouldn't it fallback to the default locale and still find the record ? If I have a similar use of @story.slug_en, and that the record have not been saved yet in its english locale version, it does returns nil so far and breaks with an error (@story.slug_en would be nil) Is there is something to add in the conf ? thanks if any tips |
Hi, i had same problem and i resolved in this way
|
I've a generic answer. in your application_helper.rb if you have a namespace you can set up in :shop, if not just
in your views in application.html.(erb/haml.slim) or wherever you want to render the translations. |
Hi there,
I've been scratching my head for the last few hours, looking for an answer but I can't find it anywhere.
My gem file:
Here's the situation:
So I assume friendly_id and globalize are properly configured.
However my problem is that I can't make a language switcher work using:
The route becomes en/pages/slug-fr (i.e. the language changes but not the slug).
I have activated config.use :finders in the initializer.
My page model:
So what do I need to do to have the proper path on my language switcher?
Ideally, I'd like this to work with any models, not just the Page model.
Thanks!
The text was updated successfully, but these errors were encountered: