ConstAll existing languages (name -> id map)
Language definitions loaded from config
Current language ID
Current language name
Update the text size example when the slider changes.
The text size percentage
Check if language name has changed and update UI accordingly. Shows/hides the MeCab option for Japanese.
The language name
Check the status of a LibreTranslate server.
The LibreTranslate URL
Optional API key
Check the status of a translator URL.
The translator URL to check
Check the translator type and update the select box.
The translator URL
The select element to update
Validate the Voice API JSON configuration.
The API configuration JSON string
true if valid, false otherwise
Update the word character method select based on current value.
The current method value
Display an error message for LibreTranslate connection issues.
The error message
Perform a full form check on page load.
Handle multi-word translator selection change.
The selected translator type
Reload dictionary URLs with the given language codes.
Source language code (default: 'auto')
Target language code (default: 'en')
Test the Voice API with a demo text.
Handle word character method selection change.
The selected method ('regexp' or 'mecab')
Language form object. Handles the language configuration form functionality.