mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
Document better the argument of the select_bundled_translation
This commit is contained in:
parent
691039b7ea
commit
9b1d4e740c
2 changed files with 12 additions and 2 deletions
|
@ -270,8 +270,13 @@ inline void update_all_translations()
|
|||
|
||||
/// Select the current translation language when using bundled translations.
|
||||
/// This function requires that the application's `.slint` file was compiled with bundled
|
||||
/// translations. It must be called after creating the first component. Returns true if the language
|
||||
/// was selected; false if the language was not found in the list of bundled translations.
|
||||
/// translations. It must be called after creating the first component.
|
||||
///
|
||||
/// The language string is the locale, which matches the name of the folder that contains the
|
||||
/// `LC_MESSAGES` folder. An empty string or `"en"` will select the default language.
|
||||
///
|
||||
/// Returns true if the language was selected; false if the language was not found in the list of
|
||||
/// bundled translations.
|
||||
inline bool select_bundled_translation(std::string_view language)
|
||||
{
|
||||
return cbindgen_private::slint_translate_select_bundled_translation(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue