mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
c902d91c81
- This fits more closely, as this service is to so with rendering helpers and small parts - Whereas we want to use "rendering" for things concerned with rendering pages
21 lines
535 B
JavaScript
21 lines
535 B
JavaScript
// # 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/
|
|
|
|
const {SafeString} = require('../services/handlebars');
|
|
|
|
module.exports = function lang(options) {
|
|
const locale = options.data.site.locale;
|
|
return new SafeString(locale);
|
|
};
|