Internationalization and localization tools


Locale-Sensitive JavaScript Method

str.fixed();

Internationalization (I18n) Method Overview

This method is used to display a string in fixed-pitch font. It returns the string embedded in an HTML tt tag.

For example:

var str = "Hello";
var result = str.fixed();


Method returns:

<tt>Hello</tt>

Click here (w3schools) and here (MDN) for additional details.

Note: This method has been deprecated and is not supported in HTML5; it has also been dropped from the Web standards. Instead, web pages should use CSS properties.

I18n Issues

Font styles are locale-sensitive: one locale's language or culture may require a different font style than another locale's language and culture. In addition, some of the more complex characters, such as Asian characters, may not be supported by the fix-pitch font.

Suggested Replacement

Use locale-sensitive css files to hold font names and styles used in web pages. Then, retrieve the correct css file at run-time, based on the application's locale.


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.



Locale-Sensitive JavaScript Methods

 

Lingoport internationalization and localization services and software