How to Translate the Fivemon Framework
⚠️ Important: Before starting, make sure to read the guides for
uri-configanduri-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:
-
Copy the content of both base files (e.g., the English ones).
-
Paste them together.
-
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_keywill automatically retrieve the translated value forexample_keyfrom 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
.urilocfile for each locale.
Example:.en.uriloc,.es.uriloc,.pt.uriloc, etc. -
These files store translation keys and their localized values.
You can:
-
Use
uri-configto add new keys. -
Use
uri-replaceto 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:
-
Configure Locales in
config.json
Edit your locales usinguri-config. Set the desired languages (e.g.en_US,es_ES,pt_BR) in thelocalesarray. -
Create Your Locale File
Copy the contents of the base locale files fromuri-core:-
data/locales/en_US.json -
addonscontent/monsters/data/locales/en_US.json
Merge them and save touri-config/data/locales/your_locale.json.
-
-
Translate Your File
Translate the combined content manually or with AI. This covers items, UI labels, mechanics, etc. -
Translate Monster Data
Pokémon names, moves, and abilities are in PokéAPI-based JSON files (insidemonsters-wrapper/data).
To preserve changes across updates, override them usinguri-replace. -
Special Notation
You may find placeholders like~locale~example_keyin JSON files — these reference your locale keys automatically. -
Translating
.uriFiles
For.uriscripts, create.urilocfiles like.es.uriloc, containing key-value translations.
Useuri-configto define them oruri-replaceto override base ones.