Package com.unciv.models.translations

Types

TranslationEntry
Link copied to clipboard
class TranslationEntry(entry: String) : HashMap<String, String>

One 'translatable' string

TranslationFileReader
Link copied to clipboard
object TranslationFileReader
TranslationFileWriter
Link copied to clipboard
object TranslationFileWriter
Translations
Link copied to clipboard
class Translations : LinkedHashMap<String, TranslationEntry>

This collection holds all translations for the game.

Functions

equalsPlaceholderText
Link copied to clipboard
fun String.equalsPlaceholderText(str: String): Boolean
fillPlaceholders
Link copied to clipboard
fun String.fillPlaceholders(vararg strings: String): String

Substitutes placeholders with strings, respecting order of appearance.

getConditionals
Link copied to clipboard
fun String.getConditionals(): List<Unique>
getPlaceholderParameters
Link copied to clipboard
fun String.getPlaceholderParameters(): List<String>
getPlaceholderText
Link copied to clipboard
fun String.getPlaceholderText(): String
hasPlaceholderParameters
Link copied to clipboard
fun String.hasPlaceholderParameters(): Boolean
removeConditionals
Link copied to clipboard
fun String.removeConditionals(): String
tr
Link copied to clipboard
fun String.tr(): String

This function does the actual translation work, using an instance of Translations stored in UncivGame.Current

Properties

curlyBraceRegex
Link copied to clipboard
val curlyBraceRegex: Regex
eitherSquareBraceRegex
Link copied to clipboard
val eitherSquareBraceRegex: Regex
pointyBraceRegex
Link copied to clipboard
val pointyBraceRegex: Regex
squareBraceRegex
Link copied to clipboard
val squareBraceRegex: Regex