Skip to content

How to Translate the Fivemon Framework

⚠️ Important: Before starting, make sure to read the guides for uri-config and uri-replace, as they are essential for correctly managing and overriding translations in the framework.

Translating the entire framework requires a few steps, but once you understand the structure, it's a manageable process. This guide explains everything you need to know to fully localize your project using the core tools: uri-config and uri-replace.


Step 1: Configure Locales in config.json

The main place to configure your locales is in the config.json file, which should be edited through the uri-config resource. This is the key resource for translation management.

Inside the config file, look for the locales setting. You can specify which locales you want to load, such as:

  • en_US

  • es_ES

  • pt_BR

Use the format that matches the locale you're targeting.


Step 2: Where to Find Existing Locales

Locale files are primarily located in the uri-core resource. There are usually two main files for each language:

  • uri-core/data/locales/en_US.json

  • uri-core/addonscontent/monsters/data/locales/en_US.json

We do not recommend editing or overwriting these files directly.

Instead:

  1. Copy the content of both base files (e.g., the English ones).

  2. Paste them together.

  3. Save the result as a new file inside:
    uri-config/data/locales/your_locale_code.json

This will be your custom translation file.
Make sure it is properly loaded in your fxmanifest.lua.


Step 3: Translating Content

Once you've created your new locale file, you can begin translating its content manually or using any translation tool.

This file controls most of the in-game text, including:

  • Item names and descriptions

  • UI labels

  • Mechanics

  • Prompts, messages, etc.


Step 4: Translating Monsters Data in monsters-wrapper

Monster-related data such as Pokémon names, moves, and abilities is sourced from files based on the PokéAPI. Some of them already include translations, but many are only available in English.

To fully localize this content:

  • Manually edit the relevant large JSON files inside the data/ folder.

  • Currently, there’s no simpler method available.

  • A dedicated editor may be developed in the future.

To avoid breaking changes during updates to monsters-wrapper, it's highly recommended to use the uri-replace resource.

uri-replace allows you to:

  • Override existing files or add new ones.

  • Safely customize content in a way that persists through framework updates.


Step 5: Special Notation in Translation Files

In certain files like items.json, you may see a notation like ~locale~. This acts as a reference to your locale file.

For example:

  • ~locale~example_key will automatically retrieve the translated value for example_key from the active locale.

  • This is commonly used for item names, zone names, and other dynamic text.


Step 6: Translating .uri Files

.uri files have their own localization system based on companion .uriloc files.

To translate them:

  • Create a corresponding .uriloc file for each locale.
    Example: .en.uriloc, .es.uriloc, .pt.uriloc, etc.

  • These files store translation keys and their localized values.

You can:

  • Use uri-config to add new keys.

  • Use uri-replace to override existing entries from the base framework.

Summary

Translating the Fivemon framework involves configuring the correct locales and preparing custom translation files. Here's a quick overview:

  1. Configure Locales in config.json
    Edit your locales using uri-config. Set the desired languages (e.g. en_US, es_ES, pt_BR) in the locales array.

  2. Create Your Locale File
    Copy the contents of the base locale files from uri-core:

    • data/locales/en_US.json

    • addonscontent/monsters/data/locales/en_US.json
      Merge them and save to uri-config/data/locales/your_locale.json.

  3. Translate Your File
    Translate the combined content manually or with AI. This covers items, UI labels, mechanics, etc.

  4. Translate Monster Data
    Pokémon names, moves, and abilities are in PokéAPI-based JSON files (inside monsters-wrapper/data).
    To preserve changes across updates, override them using uri-replace.

  5. Special Notation
    You may find placeholders like ~locale~example_key in JSON files — these reference your locale keys automatically.

  6. Translating .uri Files
    For .uri scripts, create .uriloc files like .es.uriloc, containing key-value translations.
    Use uri-config to define them or uri-replace to override base ones.