提取导轨I18N翻译要在React中呈现
我有一个React/Rails应用程序,我正在设置I18N翻译。使用rails-i18n和i18n.js宝石。我有英语和西班牙语的en.yml和es.yml文件。翻译似乎适合此应用程序。我能够在视图中获得翻译。但是,有第二个React/Redux应用程序,可以将API调用到同一后端。是否可以使用我在轨道上已经拥有的翻译?如果是这样,设置翻译的最佳方法是什么?
I have a React/Rails application which I am setting up i18n translations. Using rails-i18n and i18n.js gems. I have en.yml and es.yml files for english and spanish. The translations seem to work well for this application. I am able to get the translations rendered in the in the view. However, there is a second React/Redux application which makes api calls to this same backend. Is it possible to use the translations I already have in Rails? If so, what is the best way to set the translations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论