2018-01-09 16:50:57 +03:00
|
|
|
// # lang helper
|
|
|
|
// {{lang}} gives the current language tag
|
|
|
|
// Usage example: <html lang="{{lang}}">
|
|
|
|
//
|
|
|
|
// Examples of language tags from RFC 5646:
|
|
|
|
// de (German)
|
|
|
|
// fr (French)
|
|
|
|
// ja (Japanese)
|
|
|
|
// en-US (English as used in the United States)
|
|
|
|
//
|
|
|
|
// Standard:
|
|
|
|
// Language tags in HTML and XML
|
|
|
|
// https://www.w3.org/International/articles/language-tags/
|
|
|
|
|
2022-04-05 19:38:46 +03:00
|
|
|
const {SafeString} = require('../services/handlebars');
|
2018-01-09 16:50:57 +03:00
|
|
|
|
2021-05-04 18:49:35 +03:00
|
|
|
module.exports = function lang(options) {
|
|
|
|
const locale = options.data.site.locale;
|
|
|
|
return new SafeString(locale);
|
2018-01-09 16:50:57 +03:00
|
|
|
};
|