DefaultStringLoader

Default implementation of a StringLoader.

Parameters

context

the Context from which to load the string resources

Default implementation of a StringLoader.

actual class DefaultStringLoader

Default implementation of a StringLoader.

Parameters

bundle

the NSBundle from which to load the string resource

table

the string table to search in. If tableName is 'nullor is an empty string, the method attempts to use the table in Localizable.strings`

Default implementation of a StringLoader.

Parameters

transformer

method for getting a String from a String identifier

formatter

method for formatting a String identifier given a quantity

Default implementation of a StringLoader.

Parameters

transformer

method for getting a String from a String identifier

formatter

method for formatting a String identifier given a quantity

Constructors

Link copied to clipboard
constructor(context: Context?)
actual constructor()
expect constructor()
constructor(bundle: <Error class: unknown class>, table: String?)
actual constructor()
constructor(transformer: (String) -> String?, formatter: (String, Int) -> String?)
actual constructor()
constructor(transformer: (String) -> String?, formatter: (String, Int) -> String?)
actual constructor()

Functions

Link copied to clipboard
open override fun loadQuantityString(identifier: String, quantity: Int, defaultValue: String): String

Attempts to load grammatically correct pluralization of the given string identifier. If no match is found, the defaultValue will be returned.

abstract fun loadQuantityString(identifier: String, quantity: Int, defaultValue: String): String

Attempts to load grammatically correct pluralization of the given string identifier. If no match is found, the defaultValue will be returned.

open fun loadQuantityString(identifier: String, quantity: Int, defaultValue: String): String
open override fun loadQuantityString(identifier: String, quantity: Int, defaultValue: String): String

Attempts to load grammatically correct pluralization of the given string identifier. If no match is found, the defaultValue will be returned.

open override fun loadQuantityString(identifier: String, quantity: Int, defaultValue: String): String

Attempts to load grammatically correct pluralization of the given string identifier. If no match is found, the defaultValue will be returned.

Link copied to clipboard
open override fun loadString(identifier: String, defaultValue: String): String

Attempts to load the string resource associated with a given identifier. If no match is found, the defaultValue will be returned.

abstract fun loadString(identifier: String, defaultValue: String): String

Attempts to load the string resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open fun loadString(identifier: String, defaultValue: String): String
open override fun loadString(identifier: String, defaultValue: String): String

Attempts to load the string resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open override fun loadString(identifier: String, defaultValue: String): String

Attempts to load the string resource associated with a given identifier. If no match is found, the defaultValue will be returned.