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 #28

Open hjonin opened 1 year ago

hjonin commented 1 year 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!

adamduncan commented 4 months ago

Thanks for this, @hjonin. Apologies this plugin hasn't seen much attention lately.

Hoping to revisit and bring a few of these modern improvements along.