Duplicate variables

Discussion in 'Rust Discussion' started by SONE, Feb 18, 2015.

  1. If i have variable called for example "EventStart", can i duplicate it for to set info in different language, and is that will show in same time like 1st message.

    For example:
    in my json:
    "EventStart": "Info for English Player is here",
    "EventStart": "Info for Polish Player is here"

    will show on my chat server:

    [Server]: Info for English Player is here
    [Server]: Info for Polish Player is here

    or it will be error for duplicate variable
     
  2. No error but only the last will be shown.
     
  3. So how can i set multilanguage variables ?
     
  4. Lang > locale > keys per language.
    Your plugin will need to keep track of user locale to be able to serve the correct message.
     
  5. But i find something like that:
    "EventStart": [
    "EventStart": "Info for English Player is here",
    "EventStart": "Info for Polish Player is here"
    ],
     
  6. Code:
    {
        "EventStart":
            {
                "pl-PL": "Info for Polish Player is here",
                "en-US": "Info for English Player is here"
            }
    }