TolgeeApple

data class TolgeeApple : Tolgee(source)

A data class representing the implementation of the Tolgee localization framework for Apple platforms. This class extends the base Tolgee class and provides methods for accessing translated strings, either as flows or as immediate values.

Types

Link copied to clipboard
object Companion

Contains utility methods for fetching localized strings from the main resource bundle or a fallback base resource bundle.

Properties

Link copied to clipboard
val changeFlow: MutableSharedFlow<Unit>
Link copied to clipboard
open override val config: Tolgee.Config

Functions

Link copied to clipboard
Link copied to clipboard
open fun getLocale(): Locale
Link copied to clipboard
open suspend fun preload()
Link copied to clipboard
Link copied to clipboard
open fun setLocale(locale: Locale): Locale
open fun setLocale(localeTag: String): Locale

fun setLocale(nsLocale: NSLocale): DefaultLocaleImpl

Sets the current locale for the Tolgee instance, updating it in the reactive locale flow.

Link copied to clipboard
open fun t(key: String, parameters: TolgeeMessageParams): String?

fun t(key: String, default: String?, table: String? = null): String?

Retrieves the translation for a given key immediately. If no translation is found, falls back to the provided default value or bundle localization.

fun t(key: String, default: String?, table: String? = null, vararg args: Any): String?

Retrieves an immediate translation string for the given key with optional parameters and a fallback.

Link copied to clipboard
open fun tArray(key: String): List<String>
Link copied to clipboard
open fun tArrayFlow(key: String): Flow<List<String>>
Link copied to clipboard
open fun tFlow(key: String, parameters: TolgeeMessageParams): Flow<String>

fun tFlow(key: String, default: String?, table: String? = null): Flow<String>

Provides a flow of localized strings based on the given key, default value, and optional table name.

fun tFlow(key: String, default: String?, table: String? = null, vararg args: Any): Flow<String>

Provides a flow of localized string representations for a given key, allowing localization updates based on dynamic arguments and optional table-specific localization contexts.