【文件属性】:
文件名称:hapi-i18n:基于mashpie的i18n模块的hapi转换模块
文件大小:24KB
文件格式:ZIP
更新时间:2021-05-07 05:26:27
JavaScript
hapi-i18n
基于mashpie的i18n模块的hapi转换模块。
最新版本适用于Hapi 17+。 对于Hapi版本<17,请使用
安装
npm install hapi-i18n
用法
有关详细信息,请参见的示例。
i18n模块连接到使用请求的语言环境配置的请求对象。 这样可以确保在同时处理多个请求时为请求设置正确的语言环境。
JavaScript
function ( request , h ) {
return {
message : request . i18n . __ ( 'My localized string' )
} ;
} ) ;
帕格模板
doctype html
html ( lang = languageCode )
body
p != __ ( "My localized string" )
p != __ (
【文件预览】:
hapi-i18n-master
----index.js(3KB)
----package.json(1002B)
----test()
--------locales()
--------test.js(14KB)
--------views()
--------.gitignore(14B)
----LICENSE(1KB)
----package-lock.json(52KB)
----.gitignore(69B)
----.circleci()
--------config.yml(100B)
----README.md(4KB)