Added hreflang alternate urls

This commit is contained in:
Godwin
2016-06-17 19:18:18 -07:00
parent 2ee8849153
commit 70fd4ccef8
6 changed files with 35 additions and 20 deletions
+5 -6
View File
@@ -10,12 +10,11 @@
%a{href: 'https://github.com/bikebike/BikeBike', target: :_blank}
=_'links.footer.text.Help_contribute'
%ul.locales
-I18n.backend.enabled_locales.each do |locale|
- if locale.to_s != I18n.locale.to_s # don't show the current locale
%li
- locale_translation = _("languages.#{locale}", locale: locale)
%a{href: url_for_locale(locale)}
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale
- @alt_lang_urls.each do |locale, url|
%li
- locale_translation = _("languages.#{locale}", locale: locale)
%a{href: url, lang: locale}
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale if locale != I18n.locale.to_s
.copy
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
=link_to :humans_txt, {title: title} do