locale
Summary
Gets the locale name (language code, e.g., "en-US", "fr", "de", "ja", etc.) for the composition event, if available; otherwise, the empty string.
Property of dom/CompositionEventdom/CompositionEvent
Syntax
Note: This property is read-only.
var localeName = event.locale;
Return Value
Returns an object of type StringString
The locale of the event.
Examples
function getLocale(e) {
//retrieve locale string for composition event
var localeString = e.locale;
return localeString;
}
Notes
For trusted events, the locale property is set for keyboard and Input Method Editor (IME) input only. The locale name is set from the default LCID of the thread, en-US
, for example.
See also
Related pages
- KeyboardEventKeyboardEvent
- TextEventTextEvent
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]