preloadAll

fun preloadAll(lifecycleOwner: LifecycleOwner): Job(source)

Preloads all available languages and their translations into memory.

This is a convenience method that launches a coroutine in the provided LifecycleOwner's lifecycle scope and calls the suspend preloadAll function.

This method loads translations for all locales defined in the manifest or configuration. Translations are loaded into the LRU cache according to the configured cache size limit (see Config.ContentDelivery.maxLocalesInMemory).

Use cases:

  • Applications that support frequent locale switching

  • Offline-first applications that want to cache multiple languages

  • Improving performance by preloading translations at app startup

Parameters

lifecycleOwner

any LifecycleOwner to launch the coroutine from, e.g. Activity or Fragment

See also

For the base suspend function

For loading only the current locale