Extends
Constructor
new ve.ui.LanguageInputWidget([config])
#
Hierarchy
Creates an ve.ui.LanguageInputWidget object.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
Methods
getDir() → {string|null
}
#
null
}
#
Get the directionality
Returns:
Directionality (ltr/rtl)
- Type
-
string
|
null
getLang() → {string|null
}
#
null
}
#
Get the language
Returns:
Language code
- Type
-
string
|
null
isReadOnly() → {boolean}
#
Check if the widget is read-only
Returns:
- Type
- boolean
onChange()
#
Handle input widget change events.
onFindLanguageButtonClick()
#
Handle find language button click events.
setDisabled(disabled) → {ve.ui.LanguageInputWidget}chainable
#
Disable or enable the inputs
Parameters:
Name | Type | Description |
---|---|---|
disabled |
boolean | Set disabled or enabled |
Returns:
setLangAndDir(lang, dir) → {ve.ui.LanguageInputWidget}chainable
#
Set language and directionality
The inputs value will automatically be updated.
Parameters:
Name | Type | Description |
---|---|---|
lang |
string
|
null
|
Language code |
dir |
string
|
null
|
Directionality |
Returns:
Fires:
Set language and directionality
The inputs value will automatically be updated.
setReadOnly(readOnly) → {ve.ui.LanguageInputWidget}chainable
#
Set the read-only state of the widget
Parameters:
Name | Type | Description |
---|---|---|
readOnly |
boolean | Make widget read-only |
Returns:
updateControlsDisabled() → {OO.ui.NumberInputWidget}protectedchainable
#
Update the disabled state of the controls
Returns:
The widget, for chaining
Events
change(lang, dir)
#
Parameters:
Name | Type | Description |
---|---|---|
lang |
string | Language code |
dir |
string | Directionality |