|
Locale-Sensitive JavaScript Method
Internationalization (I18n) Method OverviewThis method creates an array of substrings by using the separator string (or regular expression) to determine where the splits should be.
If separator is not specified, then the resulting array will contain just one entry which will be the entire string. Use limit is
specify the maximum number of substrings in the array. Click here (w3schools) and here (MDN) for additional details. I18n IssuesWhether or not calling
Suggested ReplacementIf the string is user-facing, it will need be translated by retrieving it from a locale-sensitive resource file. Searching for characters that may not exist in translated strings (such as spaces) will need to be refactored. You may need to also retrieve the separator from a locale-sensitive resource file. If the string is to be displayed to the user, or is entered by the user, and the separator is a regular expression, then you will need to use a 3rd party regular expression object that supports all Unicode characters (for example, XRegExp). Globalyzer will detect this method and report it as an I18n issue. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.
|