libappstream::functions

Function utils_locale_is_compatible

source
pub fn utils_locale_is_compatible(
    locale1: Option<&str>,
    locale2: Option<&str>,
) -> bool
Expand description

Calculates if one locale is compatible with another. When doing the calculation the locale and language code is taken into account if possible.

§locale1

a BCP47 or POSIX locale string, or None

§locale2

a BCP47 or POSIX locale string, or None

§Returns

true if the locale is compatible.