先打開strings.xml(路徑:APP → res → values → strings.xml)
可以在string.xml裡先建好要需要的string
例如:
其中string name=" ",雙引號中間填入的值就類似ID,不可以重複
而在string標籤中填入的值就是使用者看到的值。
像上面的例子就是string name為tx_off的值顯示為CLOSE
其他以此類推
然後按下string.xml右上方Open Editor的按鈕
開啟Translations Editor後,上方有個地球的按鈕,按下後就可以找需要增加的語系
可以在string.xml裡先建好要需要的string
例如:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<string name="app_name">ToggleBtn</string> | |
<string name="tx_off">CLOSE</string> | |
<string name="tx_on">OPEN</string> | |
</resources> |
而在string標籤中填入的值就是使用者看到的值。
像上面的例子就是string name為tx_off的值顯示為CLOSE
其他以此類推
然後按下string.xml右上方Open Editor的按鈕
開啟Translations Editor後,上方有個地球的按鈕,按下後就可以找需要增加的語系
選擇需要的語系後就可以填入相對應的值了
或者也可以在新增的strings.xml直接填入對應的值
留言
張貼留言