WARNING: This is WORK IN PROGRESS documentation for the NEXT version of Dojo.
Globalization Guidelines
| Authors: |
Adam Peller |
| since: | V0.9? |
Dojo addressed the globalization features at the very beginning of its development. This document presents the rules and describes how to use these features to globalize your Web applications based on Dojo version 1.0. Each of the rules use one of the following directive words:
- Must: You must always follow the rules; otherwise your application cannot be globalized.
- Should: You are recommended to follow the rules in some situations. Your application can be globalized if you do not follow these rules, but more effort might be needed.
- May: These rules do not affect the capability of globalization. You can choose whether to follow them or not.
Use the following guidelines to implement internationalization.
- You should use the Js2Xlf tool to convert JSON files into XLIFF files for translation.
- You should deal with free text using ICU library at the server side.
- You should use only casing functions for locale neutral situation.
- You should not use locale sensitive casing functions provided by JavaScript.
- You should always escape a string as a whole rather than character by character.
- You should not use any comparing, searching, or replacing functions for strings that might contain combining character sequences.
- You should not use inserting, removing, or splitting functions for strings that might contain special characters.
- You should not use trimming functions for strings that might contain special characters.
- You should not use counting functions for strings that might contain special characters.
- You must check the return value of String.charAt() when the string contains surrogates.