DefaultDocBundleLoader

Default implementation that loads docs from bundled markdown files packaged as Compose Resources under files/docs/.

User guide titles and keywords are resolved from string resources so Crowdin translations propagate to the in-app index and search. Developer guide entries stay hardcoded English (code-focused audience).

No cross-locale caching — the bundle rebuilds on each load call (~1 ms) so locale changes take effect immediately.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun hasTranslatedResource(pageId: String, locale: String): Boolean

Check whether a Crowdin-translated resource exists for the given page and locale.

Link copied to clipboard
open suspend override fun load(): DocBundle
Link copied to clipboard
open override fun pagesBySection(section: DocSection): List<DocPage>
Link copied to clipboard
open suspend override fun readPage(pageId: String): DocPageContent?
Link copied to clipboard
suspend fun readPageLocalized(pageId: String, locale: String): Pair<DocPageContent?, Boolean>

Load page content with locale awareness. Tries locale-qualified Crowdin resource first, falls back to English. Returns a pair of (content, wasLocalized) for cascade decision.