Skip to content

Latest commit

 

History

History
39 lines (35 loc) · 1.07 KB

README.md

File metadata and controls

39 lines (35 loc) · 1.07 KB

Resources: Properties

Gradle dependency

dependencies {
    localize 'ru.pocketbyte.locolaser:resource-properties:2.0.0'
}

Config

Properties Resources can be defined by single string or by JSON object. In case of string you can use value "properties".
JSON object should have following structure:

{
    "type" : "properties",
    "res_name" : (String value),
    "res_dir" : (Path to dir)
}

Properties description:

  • type - String. Type of the resource. In case of Properties should be used value "properties".
  • res_name - String. Resource file name. Default value: "strings".
  • res_dir - String. Path to resources directory. Default value: "./locales/".

Plurals

Plurals are not supported in Properties resource implementation. All quantities except OTHER will be ignored.

Example

Here is the example of LocoLaser config where Properties file used as a platform.

{
    "platform" : {
        "type" : "properties",
        "res_dir" : "./lang/"
    },
    "source" : "android",
    "locales" : ["en", "fi"]
}