earth-europeLocales

Add or edit translations for Chamly Drugs.

Available Languages

  • 🇬🇧 English (en) - Default

  • 🇵🇱 Polish (pl) - Polski

Changing Language

Edit config/main.lua:

Config.Locale = 'en'  -- Change to 'pl' for Polish

Restart resource after changing:

restart chamly_drugs

Adding New Language

Step 1: Create Locale File

Create a new file in locales/ folder:

locales/your_lang.lua

Examples:

  • es.lua - Spanish

  • de.lua - German

  • fr.lua - French

  • pt.lua - Portuguese

Step 2: Copy Template

Copy content from locales/en.lua and translate all strings:

Step 3: Update Config

Edit config/main.lua:

Step 4: Restart

Translation Keys Reference

All translatable strings are organized in categories:

Errors

Notifications

Target System

TextUI (Standalone Mode)

Discord Logs

Placeholders

Some strings use placeholders that get replaced with actual values:

  • %s - String value (drug name, item name, etc.)

  • %d - Number value (amount, count, etc.)

  • %sx - Amount with 'x' (e.g., "10x Weed")

Example:

Language Files Location

Testing Translations

After adding translations:

  1. Set Config.Locale to your language code

  2. Restart resource

  3. Test in-game:

    • Harvest drugs (check notifications)

    • Process drugs (check messages)

    • Trigger errors (check error messages)

    • Use target system (check prompts)

Common Translation Tips

Keep It Concise

❌ Bad: 'You have successfully harvested the marijuana plant and received items' ✅ Good: 'Harvested marijuana'

Test Lengths

Some languages are longer than English:

  • German words can be very long

  • Make sure UI doesn't break with long text

  • Test with longest possible strings

Preserve Placeholders

Always keep %s and %d placeholders:

❌ Wrong:

✅ Correct:

Example: Full Spanish Translation

Need Help?

  • Copy existing locale file as template

  • Use Google Translate for basic translation

  • Ask native speakers to review

  • Test thoroughly in-game

Questions? Contact Support

Last updated