PropertiesSource

A TranslationSource that reads and writes key-value pairs from a properties file.

Author

TOTHTOMI

Since

Jul. 23, 2023

Parameters

path

the path to the properties file. If the file does not exist, it will be created.

Constructors

Link copied to clipboard
constructor(path: Path)

Initialize the properties object from the file or create a new one if the file does not exist

Functions

Link copied to clipboard
open override fun getRawString(key: String, defaultValue: String?): String?

Returns the value associated with the given key, or the default value if the key is not found. If the key is not found and the default value is not null, the key-value pair will be added to the properties and saved to the file.