pull

open override fun pull(locale: String, file: Path): ConfigLoaderBuilder<T>

Resolves a locale-specific resource file and sets the output path.

Given a resource root directory (set via fromResource), this method tries:

  1. {root}{locale}.{extension}

  2. {root}{language}.{extension}

  3. {root}en.{extension} (fallback by default)

If neither is found, an IllegalStateException is thrown. The resolved resource path and the given file are stored for use during load.

Example:

Yacla.loader<MyConfig>()
.fromResource("/assets/mymod/config/")
.pull("ja_JP", configFile)
.parser(YamlParser())
.load()

Parameters

locale

the locale string (e.g. "ja_JP", "en")

file

the output path where the resolved resource will be copied


open override fun pull(file: Path): ConfigLoaderBuilder<T>

Resolves a localized resource using the configured language.

By default this uses the current JVM locale and falls back to en. Requires fromResource to be called first with a directory root path.

Parameters

file

the base output path for the selected config file