Skip to content

Latest commit

 

History

History
123 lines (99 loc) · 4.52 KB

Translation.md

File metadata and controls

123 lines (99 loc) · 4.52 KB

🌍 Multilanguage Support for LavaMusic 🎶

🌟 How to Add a New Language

  1. 📁 Create a new file in the locales directory with the name of the language in the format language_code.json. For example, EnglishUS.json for English, SpanishES.json for Spanish, etc.
  2. 📋 Copy the contents of the EnglishUS.json file into the new file.
  3. 🌐 Translate the strings in the new file to the desired language.

📚 Available Translations

  • English (US) - EnglishUS.json (Default)
  • Bulgarian - Bulgarian.json (Not Started)
  • Chinese (CN) - ChineseCN.json by @appujet (Ai Translation - Not Accurate)
  • Chinese (TW) - ChineseTW.json by @apple050620312
  • Croatian - Croatian.json (Not Started)
  • Czech - Czech.json (Not Started)
  • Danish - Danish.json (Not Started)
  • Dutch - Dutch.json (Not Started)
  • English (GB) - EnglishGB.json (Not Started)
  • Finnish - Finnish.json (Not Started)
  • French - French.json by @LucasB25
  • German - German.json by @LucasB25
  • Greek - Greek.json (Not Started)
  • Hindi - Hindi.json by @Appujet (Ai Translation - Not Accurate)
  • Hungarian - Hungarian.json (Not Started)
  • Indonesian - Indonesian.json by @iaMJ
  • Italian - Italian.json (Not Started)
  • Japanese - Japanese.json by @hatry4
  • Korean - Korean.json by @hwangsihu
  • Lithuanian - Lithuanian.json (Not Started)
  • Norwegian - Norwegian.json by @appujet (Ai Translation - Not Accurate)
  • Polish - Polish.json by @InfNibor and by @LucasB25
  • Portuguese (BR) - PortugueseBR.json (Not Started)
  • Portuguese (PT) - PortuguesePT.json by @LucasB25
  • Romanian - Romanian.json (Not Started)
  • Russian - Russian.json by @LucasB25
  • Spanish (ES) - SpanishES.json by @LucasB25
  • Swedish - Swedish.json (Not Started)
  • Thai - Thai.json (Not Started)
  • Turkish - Turkish.json by @IlkayAksoy
  • Ukrainian - Ukrainian.json (Not Started)
  • Vietnamese - Vietnamese.json by @nhutlamm (Ai Translation - Not Accurate)

📚 How to Use the Translations

  1. 📁 Create a new file in the locales directory with the name of the language in the format language_code.json. For example, EnglishUS.json for English, SpanishES.json for Spanish, etc.

  2. 📋 Copy the contents of the EnglishUS.json file into the new file.

  3. 🌐 Translate the strings in the new file to the desired language.

Have a language to contribute? 🎉

  • Fork the repository.
  • Add the translation file in the locales directory.
  • Create a pull request with the changes.

📝 Translation Guidelines

  • Do not change the key names in the translation JSON file.
  • Do not change the structure of the translation JSON file.
  • Do not remove the {} tags from the strings.
  • Do not add any new keys to the translation JSON file.
  • Do not add any new directories to the repository.

📝 Translation JSON Structure

The translation JSON file should be structured as follows:

{
 "category": {
  "command": {
   "description": "Description of the command.",
   "content": "Command content.",
   "key": "value"
  }
 }
}

Example Translation JSON

EnglishUS:

{
 "cmd": {
  "ping": {
   "description": "Shows the bot's ping.",
   "content": "Pinging...",
   "bot_latency": "Bot Latency",
   "api_latency": "API Latency",
   "requested_by": "Requested by {author}"
  }
 }
}

Hindi:

{
 "cmd": {
  "ping": {
   "description": "बॉट का पिंग दिखाता है।",
   "content": "पिंगिंग...",
   "bot_latency": "पिंगिंग...",
   "api_latency": "एपीआई लेटेंसी",
   "requested_by": "{author} द्वारा अनुरोधित"
  }
 }
}

Formatting Tags for i18n NPM

To ensure {} are not removed during translations, use the format tags: ["{", "}"].

📚 Resources