adamduncan / eleventy-plugin-i18n

Eleventy plugin to assist with internationalization and dictionary translations
MIT License
103 stars 10 forks source link

Use the `lang` `page` variable attribute #27

Closed hjonin closed 9 months ago

hjonin commented 9 months ago

Hi!

Since the version 2.0 of 11ty, a lang attribute has been available in the page variable.

I am suggesting this PR to reflect this addition and use this handy attribute directly rather than inferring the lang from the URL.

Thanks in advance!

hjonin commented 9 months ago

Incorrect branch for PR, replaced with https://github.com/adamduncan/eleventy-plugin-i18n/pull/28.