2018-01-09 14:50:57 +01: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/
|
|
|
|
|
2020-03-19 14:07:20 +00:00
|
|
|
const {SafeString, themeI18n} = require('./proxy');
|
2018-01-09 14:50:57 +01:00
|
|
|
|
|
|
|
module.exports = function lang() {
|
2020-03-19 14:07:20 +00:00
|
|
|
return new SafeString(themeI18n.locale());
|
2018-01-09 14:50:57 +01:00
|
|
|
};
|