Top | ![]() |
![]() |
![]() |
![]() |
char * | fd_get_language_from_locale () |
char * | fd_get_country_from_locale () |
char ** | fd_get_all_locales () |
gboolean | fd_parse_locale () |
char * | fd_normalize_locale () |
gboolean | fd_language_has_translations () |
char * | fd_get_language_from_code () |
char * | fd_get_country_from_code () |
char * | fd_get_translated_modifier () |
gboolean | fd_get_input_source_from_locale () |
gboolean | fd_env_lang_is_en () |
char * fd_get_language_from_locale (const char *locale
,const char *translation
);
Gets the language description for locale
. If translation
is
provided the returned string is translated accordingly.
Since: 3.8
char * fd_get_country_from_locale (const char *locale
,const char *translation
);
Gets the country description for locale
. If translation
is
provided the returned string is translated accordingly.
Since: 3.8
char **
fd_get_all_locales (void
);
Gets all locales.
a newly allocated NULL
-terminated string array containing the
all locales. Free with g_strfreev()
.
[array zero-terminated=1][element-type utf8][transfer full]
Since: 3.8
gboolean fd_parse_locale (const char *locale
,char **language_codep
,char **country_codep
,char **codesetp
,char **modifierp
);
Extracts the various components of a locale string of the form
[language_country[modifier
]]. See
http://en.wikipedia.org/wiki/Locale.
locale |
a locale string |
|
language_codep |
location to
store the language code, or |
[out][allow-none][transfer full] |
country_codep |
location to
store the country code, or |
[out][allow-none][transfer full] |
codesetp |
location to
store the codeset, or |
[out][allow-none][transfer full] |
modifierp |
location to
store the modifier, or |
[out][allow-none][transfer full] |
Since: 3.8
char *
fd_normalize_locale (const char *locale
);
Gets the normalized locale string in the form
[language_country[modifier
]] for name
.
Since: 3.8
gboolean
fd_language_has_translations (const char *code
);
Returns TRUE
if there are translations for language code
.
Since: 3.8
char * fd_get_language_from_code (const char *code
,const char *translation
);
Gets the language name for code
. If translation
is provided the
returned string is translated accordingly.
Since: 3.8
char * fd_get_country_from_code (const char *code
,const char *translation
);
Gets the country name for code
. If translation
is provided the
returned string is translated accordingly.
Since: 3.8
char * fd_get_translated_modifier (const char *modifier
,const char *translation
);
Gets a translation of the raw modifier
string. If translation
is provided the returned string is translated accordingly.
Since: 3.34
gboolean fd_get_input_source_from_locale (const char *locale
,const char **type
,const char **id
);
Gets the default input source's type and identifier for a given locale.
locale |
a locale string |
|
type |
location to store the input source type. |
[out][transfer none] |
id |
location to store the input source identifier. |
[out][transfer none] |
Since: 3.8