1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        NativeLangNativeScript 國際化插件

        聯(lián)合創(chuàng)作 · 2023-09-24 18:20

        NativeLang 是 NativeScript 的國際化插件。

        創(chuàng)建文件:

        ├── app <----------------- run npm install from here
        │   ├── App_Resources
        │   │   └── ...
        │   ├── tns_modules
        │   │   └── ...
        │   ├── app.css
        │   ├── app.js
        │   ├── main-page.js
        │   ├── main-page.xml
        │   ├── main-view-model.js
        │   ├── node_modules
        │   │   └── nativelang <-- The install will place the module's code here
        │   │       └── ...
        │   └── package.json <---- The install will register “nativelang" as a dependency here
        └── platforms
            ├── android
            │   └── res
            │       ├── values <---------- English
            │       |   └── strings.xml
            │       ├── values-es <------- Spanish
            │       |   └── strings.xml
            │       └── values-fr <------- Fransih
            │           └── strings.xml
            └── ios

        文件:

        <!-- platforms/android/res/values/strings.xml -->
        <?xml version="1.0" encoding="UTF-8"?>
        <resources>
            <string name="app_name" formatted="false">Example 1</string>
            <string name="other" formatted="false">Other</string>
            ... More strings
        </resources>
        <!-- platforms/android/res/values-es/strings.xml -->
        <?xml version="1.0" encoding="UTF-8"?>
        <resources>
            <string name="app_name" formatted="false">Ejemplo 1</string>
            <string name="other" formatted="false">Otro</string>
            ... Y mas cadenas
        </resources>

        使用:

        app/app.js

        GLOBAL.L = require( "./node_modules/nativelang/lib" )();

        xml

        <Label  text={{ L('other')}} />
        瀏覽 24
        點(diǎn)贊
        評(píng)論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        評(píng)論
        圖片
        表情
        推薦
        點(diǎn)贊
        評(píng)論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            黑人大战欧美在线看片 | 一级录像 | 欧美艹逼片 | 骚虎网站 | 日日躁狠狠躁夜夜躁A片图片 | 黄色一级免费 | 一级黄片子| 逼逼逼网站 | 女人黄色一级片 | 少妇疯狂做受xxxx高潮台湾 |