5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 11:46:21 +00:00
panel/app/views/layouts/_link_rel_alternate.haml

8 lines
337 B
Text
Raw Normal View History

- unless current_usuarie
- params.permit!
- I18n.available_locales.each do |locale|
- url = url_for(**params.to_h.merge(change_locale_to: locale), only_path: false)
- if locale == I18n.default_locale
%link{ rel: 'alternate', hreflang: 'x-default', href: url }
%link{ rel: 'alternate', hreflang: locale, href: url }