【文件属性】:
文件名称:react-i18n:使用i18n-js进行React组件以集成Rails-i18n
文件大小:36KB
文件格式:ZIP
更新时间:2021-05-18 14:04:00
JavaScript
react-i18n
该模块与 gem集成在一起,并作为的包装器构建。
基本设定
安装模块
$ npm install --save i18n-js react-i18n
设置i18n-js
在Gemfile中
gem 'i18n-js'
您认为* .haml
:javascript
I18n.defaultLocale = "#{I18n.default_locale}";
I18n.locale = "#{I18n.locale}";
I18n.fallbacks = true;
= javascript_include_tag "i18n"
= javascript_include_tag "translations"
有关更多选项/详细信息,请参阅上的文档。
用法
React混合
import ReactI18n from 'react-i18n'
let Or
【文件预览】:
react-i18n-master
----yarn.lock(109KB)
----formatted-message.js(598B)
----translate.js(1KB)
----.travis.yml(35B)
----LICENSE(1KB)
----__tests__()
--------index-test.js(1KB)
--------__snapshots__()
----README.md(1KB)
----.gitignore(526B)
----index.js(118B)
----package.json(871B)