We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I have a bilingual site. It can be useful to add a scope and to something like this sitemap_for Page.scoped, scope: ['en', 'fr'].
sitemap_for Page.scoped, scope: ['en', 'fr']
What you think?
The text was updated successfully, but these errors were encountered:
Just to know, this is the code I created to do what I want :
def sitemap_with_locales_for(records, method) sitemap_for records do |model| I18n.available_locales.each do |locale| I18n.locale = locale url send(method, model, locale: locale), last_mod: model.updated_at, priority: 1.0 end end end prev_locale = I18n.locale sitemap_with_locales_for(Page.scoped, :page_url) sitemap_with_locales_for(ProviderProfile.provider_profiles_with_pages, :provider_profile_url) sitemap_with_locales_for(Artist.all_artists_with_paintings, :artist_url) I18n.locale = prev_locale
Sorry, something went wrong.
No branches or pull requests
Hello,
I have a bilingual site. It can be useful to add a scope and to something like this
sitemap_for Page.scoped, scope: ['en', 'fr']
.What you think?
The text was updated successfully, but these errors were encountered: