1. Dear, in the game menu there is a choice of language. Is it possible to check how the selected language of the player? If not - please add
     
  2. Wulf

    Wulf Community Admin

    Pretty sure that's all handled client-side and never sent to the server, so it's unlikely you'd be able to ever check it.
     
  3. Wulf

    Wulf Community Admin

    Country doesn't always mean language though. I know many English speakers in foreign countries that they're not native to. ;)

    It's a good general solution though.
     
  4. Yes of course, but I do not know the other way :)
     
  5. Wulf

    Wulf Community Admin

    If only they sent language with the connection like they do with OS via connection.os.
     
  6. A way would be to ask the player to choose the language with something like /en /pt /es and etc.
     
  7. Wulf

    Wulf Community Admin

    That would be a good way, but easy to conflict if multiple plugins want the same thing.
     
  8. Why would it be? i.e. If the player answer /en a value called "EN" would be stored in a global called globalLanguage, then, since it is a global variable, all the other plugins should read it without the need of calling the "language plugin". I work with globals here in my tests and they work just fine. Better than store lots of Locals in my op.
     
  9. Wulf

    Wulf Community Admin

    Plugin 1 adds chat command /en, plugin 2 adds chat command /en, you now have a conflict that. It's not really a big issue though, as it's unlikely many plugins would have it. The way I'd do it, is have a Localization plugin like Legacy had, else have some sort of native support for localization. I wouldn't like a random plugin trying to control it for everyone else.
     
  10. Well, it's an idea. A unique localization plugin that stores the player answer in a global to let the others read it. So the localization would work better for everyone.
    Anyway, in my op, if we translate all lines of our plugins all by our selves taking note of the massive public language used by our players, that should be fine. Trying to translate through plugin localization would gave us a lot of work that wouldn't be compensated afterwards.
     
  11. Why not use /language en
     
  12. Wulf

    Wulf Community Admin

    What difference would it make?

    Also, there should be a connection.language or similar var coming in a Rust update soon.
     
  13. What surely would make our life easier. And if we could change it wherever we wanted to, that would be amazing.