middleman / middleman-asciidoc

:beginner: AsciiDoc support for Middleman 4. (In Middleman 3, AsciiDoc support is provided by a core extension).
https://middlemanapp.com
Other
27 stars 12 forks source link

Set 'lang' attribute based on the locale of the page #95

Open FiveYellowMice opened 3 years ago

FiveYellowMice commented 3 years ago

Currently, an AsciiDoc document cannot conveniently obtain current_page.options[:locale] set by the I18n extension, and it seems natural for it to be reflected in the 'lang' attribute since its standard (and used by some converters).

It would be better if we are able to specify translation strings based on the locale, either obtaining them from the I18n extension or set from configuration or data files.

mojavelinux commented 3 years ago

Seems reasonable to me. If you submit a PR, I'll be happy to review it.