Get the source language code from a translator URL.
Parses the URL to extract the source language code (e.g., 'sl' parameter
for Google Translate, 'source' for LibreTranslate).
Note: Prefer using the stored sourceLang from LanguageConfig when available.
This function serves as a fallback for backwards compatibility when the
database value is not set.
Parameters
wblink3: string
Translator URL (Google Translate or LibreTranslate)
Returns string
Language code (e.g., 'en', 'fr') or empty string if not found
Since
2.7.0 Also works with LibreTranslate URLs
Since
3.2.0 Clarified as fallback; prefer LanguageConfig.sourceLang
Get the source language code from a translator URL.
Parses the URL to extract the source language code (e.g., 'sl' parameter for Google Translate, 'source' for LibreTranslate).
Note: Prefer using the stored sourceLang from LanguageConfig when available. This function serves as a fallback for backwards compatibility when the database value is not set.