NativeLang NativeScript 国际化插件

我要开发同款
匿名用户2015年08月03日
263阅读

技术信息

授权协议
MIT

作品详情

NativeLag是NativeScript的国际化插件。

创建文件:

├── app <----------------- ru pm istall from here│   ├── App_Resources│   │   └── ...│   ├── ts_modules│   │   └── ...│   ├── app.css│   ├── app.js│   ├── mai-page.js│   ├── mai-page.xml│   ├── mai-view-model.js│   ├── ode_modules│   │   └── ativelag <-- The istall will place the module's code here│   │       └── ...│   └── package.jso <---- The istall will register “ativelag" as a depedecy here└── platforms    ├── adroid    │   └── res    │       ├── values <---------- Eglish    │       |   └── strigs.xml    │       ├── values-es <------- Spaish    │       |   └── strigs.xml    │       └── values-fr <------- Frasih    │           └── strigs.xml    └── ios

文件:

<!-- platforms/adroid/res/values/strigs.xml --><?xml versio="1.0" ecodig="UTF-8"?><resources>    <strig ame="app_ame" formatted="false">Example 1</strig>    <strig ame="other" formatted="false">Other</strig>    ... More strigs</resources><!-- platforms/adroid/res/values-es/strigs.xml --><?xml versio="1.0" ecodig="UTF-8"?><resources>    <strig ame="app_ame" formatted="false">Ejemplo 1</strig>    <strig ame="other" formatted="false">Otro</strig>    ... Y mas cadeas</resources>

使用:

app/app.js

GLOBAL.L = require( "./ode_modules/ativelag/lib" )();

xml

<Label  text={{ L('other')}} />

功能介绍

NativeLang 是 NativeScript 的国际化插件。 创建文件: ├── app <----------------- run npm install from here
│   ...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论