stringResource
Retrieves a localized string resource based on the provided resource ID using Tolgee for translations. If a translation is available from Tolgee, it is used; otherwise, the default string resource is returned.
Return
The translated or default string resource as a String.
Parameters
An instance of the Tolgee translation library for managing translations.
The resource ID of the string to be translated or retrieved.
Returns a localized string from the given resource ID.
This function is a wrapper around the stringResource that integrates with the Tolgee instance for localization. If Tolgee is not initialized, it falls back to the standard Compose stringResource
.
Return
The localized string associated with the provided resource ID.
Parameters
The resource ID of the string to retrieve.
Retrieves a string resource based on the given parameters, supporting dynamic translation with Tolgee integration.
Return
The translated or resource string corresponding to the specified resource ID.
Parameters
The Tolgee instance used for translations.
The resource ID of the string to be retrieved.
Optional format arguments to replace placeholders in the string.
Retrieves a localized string resource. If a Tolgee
instance is available, it uses it to fetch the translated string; otherwise, falls back to the default Compose string resource.
Return
The localized string based on the provided resource ID and arguments.
Parameters
The resource ID of the string.
The arguments to be used for formatting the string resource.
Provides a localized string based on the given key and optional default, using the specified Tolgee instance.
Return
The localized string corresponding to the provided key, or a fallback based on the default and table parameters.
Parameters
An instance of the Tolgee library used for retrieving translations.
The key used to look up the localized string.
The default string returned if no translation is found. Can be null.
An optional parameter specifying the translation table or namespace. Defaults to null.
Retrieves a localized string based on the provided key, default value, and optional table name.
If a localization instance is available, it fetches the translation using it. Otherwise, it attempts to fetch the localized string from the application bundle or returns the default string.
Return
The localized string if available, or the fallback string based on the provided default or key.
Parameters
The key used to identify the localized string.
The default string to use if no localized string is found. If blank, it will be treated as null.
The optional table or namespace for looking up the key. Defaults to null if not specified.
Retrieves a localized string resource using the provided translation key, default value, optional table, and optional arguments. The translation is fetched from the specified Tolgee instance and updates dynamically using a state-based approach.
Return
A string value representing the localized and formatted resource.
Parameters
The Tolgee instance responsible for fetching translations.
The translation key used to identify the desired string resource.
The default string to use if no translation is found.
The optional table name where the key is located.
Optional arguments for formatting the translated string.
Retrieves a localized and formatted string based on the specified key, default value, table, and arguments. The method ensures the use of a Tolgee
instance if available, otherwise falls back to bundle-based localization.
Return
The localized and formatted string; returns an empty string if no localization is found and no default value is provided.
Parameters
The key identifying the localized string resource.
The default string to use if no localization is found. Can be null.
The optional table from which the localization data is fetched. Can be null.
The arguments to format the localized string.
Retrieves a localized string resource using the provided Tolgee translation library and resource key.
Return
The localized string corresponding to the provided key.
Parameters
The Tolgee instance used for fetching translations.
The StringResource containing the key for the desired translation.
Returns a localized string for the given string resource.
This function checks if an instance of Tolgee exists. If it does, it retrieves the string translation using Tolgee. Otherwise, it falls back to the default string resource resolution.
Return
The localized string corresponding to the given resource.
Parameters
The string resource to be localized.
Composable function to retrieve a localized string resource using Tolgee.
Return
The localized string resource.
Parameters
An instance of Tolgee used for fetching translations.
The resource key representing the string to be translated.
Optional arguments to format the translated string.
Provides a localized string for the given resource and format arguments.
This function first attempts to use the Tolgee instance for retrieving the localized string. If Tolgee is not initialized, it falls back to the Compose resource string method.
Return
The localized string formatted with the provided arguments.
Parameters
The string resource containing the key for localization.
Optional arguments to format the localized string.