Function get_preferred_language_for_format

Source
pub fn get_preferred_language_for_format(
    state: &EiteState,
    format: &str,
    direction: &str,
) -> Result<String>
Expand description

Preferred language (variant) for a format/direction. Defaults to the environment language (state.env_language) and scans the variant list for entries beginning with “lang_”.

Returns the variant label (e.g., “lang_en”) if found; otherwise the environment language.

(Original: getPreferredLanguageForFormat)