lang_from_path setting to derive document lang from relative path
This release adds a new boolean configuration setting lang_from_path. When set to true, this option tells polyglot to derive the base language from a matching subpath if the lang frontmatter is not set. This setting works well in conjunction with other translation maintenance tools such as po4a.
relative and absolute url relativization improved logic
excluded_from_localization files will have trailing slashes added to their paths if they are directories. In addition, these files will be matched differently in the relativize and absolute url regex matchers. This will improve the accuracy of url relativization based on user feedback.
Language specific content defined in your site.data directory will now be recursively merged together, so that active_lang content gets precedence over default_lang content, gets precedence over language non-specific content. (#59)
Still build unassigned files to the default_lang site root
If the default_lang is not defined in the languages, this ensures that language unassigned files (such as those excluded from localization) are still written out to the site root. (#65)
Performance improvements and fixes for i18n_headers tag
Document processing is now faster, and fixes were made to the i18n_headers for when the site.url is defined. (#67)
Custom keys for active_lang site payload
This allows custom keys to be defined with the active_lang, giving interoperability between polyglot and other plugins and themes. (#68)
A new version of Polyglot has been released! Give it a try!
gem install jekyll-polyglot
and list jekyll-polyglot among your listed gems in your _config.yml
It involves mostly groundwork to prepare for new features and better multilingual content management. It does have a new feature:
{% I18n_Headers %}
Put this tag with the url of your website in your head.html includes file to get the maximum SEO provided by having a multilingual website. It’s the same as the following liquid code:
<metahttp-equiv="Content-Language"content="{{site.active_lang}}"><linkrel="alternate"hreflang="{{site.default_lang}}"href="http://yoursite.com{{page.permalink}}"/>
{% for lang in site.languages %}
{% if lang == site.default_lang %}
{% continue %}
{% endif %}
<linkrel="alternate"hreflang="{{lang}}"href="http://yoursite.com/{{lang}}{{page.permalink}}"/>
{% endfor %}
In your header, but faster and cleaner! For more information, see the SEO page