1. Hey!

    I've run into an issue where changing the lang entries in my plugins file doesn't change the actual saved lang .json files. Is there a way to clear them on plugin reload, or delete them so they're recreated?

    Thanks
     
  2. Wulf

    Wulf Community Admin

    The language files are automatically updated to add/remove keys as you change them in your plugin. Just make sure you are using unique keys. The only way to manually remove the file though is to delete it and reload the plugin.
     
  3. Odd, whenever i save/reload the plugin they dont update.
     
  4. You could always delete the file manually in your lang folder, the plugin will then generate a new one on load with all of the correct information, but you will lose your old entries so maybe back them up first so they can be easily copy/pasted

    Edit: I missunderstood this question, ignore this comment
     
    Last edited by a moderator: Feb 22, 2017
  5. Wulf

    Wulf Community Admin

    If you are naming the keys the same, they will not be updated. This is how users customize messages, so replacing the keys would wipe their messages. The alternative you can do is rename the key and remove the old key, then it will be updated.
     
  6. They key as in the ["LoadingError"] bit here:

    Code:
    ["LoadingError"] = "Discord not loaded correctly, please check your plugin directory for the Discord.cs file.",
    I'm fine with manually deleting, i'm more-so worried about it not updating for users of my plugin.
     
  7. Wulf

    Wulf Community Admin

    As long as you rename it to something other than LoadingError or LoadingError1, it will add the new key and remove the old.
     
  8. That's kind of dumb don't you think? Do I have to do that for all of them? Because then I have to change each one where they're used as well
     
  9. Wulf

    Wulf Community Admin

    I explained it previously. ;)

    It's so that you don't wipe out customizations that users made each time your plugin loads and you make changes. If you want a new message, you'd have to either use a new key, or tell users to delete the old if they want the new message.