OneSky Dev

How to localize Android Apps

Examples:

res/values/strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="app_name">Hello world</string>
	<string name="string_1">Welcome %s</string>
	<string-array name="gender">
		<item>Female</item>
		<item>Male</item>
	</string-array>
	<plurals name="mins_ago">
		<item quantity="one">1 min ago</item>
		<item quantity="other"><xliff:g id="number">%d</xliff:g>mins ago</item>
	</plurals>
	<string name="messages_descr"><xliff:g id="count">%s</xliff:g> messages.</string>
</resources>
res/values/zh-TW/strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="app_name">世界你好</string>
	<string name="string_1">歡迎你,%s</string>
	<string-array name="gender">
		<item>女性</item>
		<item>男性</item>
	</string-array>
	<plurals name="mins_ago">
		<item quantity="one">1分鐘前</item>
		<item quantity="other"><xliff:g id="number">%d</xliff:g>分鐘前</item>
	</plurals>
	<string name="messages_descr"><xliff:g id="count">%s</xliff:g>條訊息。</string>
</resources>