Created
December 14, 2013 04:45
-
-
Save csemrm/7955779 to your computer and use it in GitHub Desktop.
How to write multi-lingual script in Titanium? Step to use: 1. Create a titanium project 2. Update app.js file with my code
3. Create new folder "i18n" in project root directory if not exits 4. Add another folder "like en" your language 5. Add new file string.xml and update my code 6. Now ready to use
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
var win = Ti.UI.createWindow({ | |
layout : 'vertical', | |
backgroundColor : '#fff' | |
}); | |
var aLabel = Ti.UI.createLabel({ | |
text : L('hello'), | |
}); | |
win.add(aLabel); | |
win.open(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<string name="hello"> | |
Welcome to Titanium! | |
</string> | |
<string name="welcome"> | |
Welcome to my gist | |
</string> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment