qb-core icon indicating copy to clipboard operation
qb-core copied to clipboard

[SUGGESTION] Add translation fallback function

Open restray opened this issue 3 years ago • 0 comments

😵‍💫 My problem

Actually when a translation is missing from the translation file, it throw an error in the console leaving the player without text or anything!

🩹 How to patch

You could easily add a "fallback function" that be working like this:

  • If the translation exist
    • Get the translation of the selected language
  • Else
    • Get the translation of the fallback language (recursively)
    • throw a warning in the console of the player

ℹ️ Additional informations

I can try to developp this, I just need people opinions about that feature to know if I spend time in useful stuff :)

restray avatar Mar 24 '22 23:03 restray