Localization Guide

Add new languages or modify existing translations.


Supported Languages

Code
Language
File

en

English

locales/en.lua

tr

Turkish

locales/tr.lua

fr

French

locales/fr.lua

de

German

locales/de.lua


Adding a New Language

Step 1: Create Language File

Create a new file in locales/ folder:

-- locales/es.lua (Spanish example)
Locales["es"] = {
    -- Menu
    hunting_actions = "Acciones de caza",
    open_hunting_menu = "Abrir menu de caza",
    cancel_contract = "Cancelar contrato",
    deliver_products = "Entregar productos",
    open_bait_shop = "Abrir tienda de cebos",

    -- Contracts
    contract_received = "Contrato recibido",
    contract_finished = "Contrato terminado",
    contract_cancelled = "Contrato cancelado",
    contract_completed = "Contrato completado! Ganaste $%d y %d XP",
    contract_not_finished = "El contrato aun no esta terminado",

    -- Hunting
    no_active_contract = "No tienes un contrato activo",
    no_trophies = "No llevas trofeos de caza",
    mission_not_found = "Mision no encontrada",

    -- Tracking
    hunter_vision_active = "Vision de cazador activa",
    no_tracks_found = "No se encontraron rastros cercanos",
    track_found = "%s encontrado - %s - Calidad: %s",
    no_contract_track = "Necesitas un contrato activo para rastrear",

    -- Bait
    bait_placed_success = "Cebo colocado exitosamente",
    bait_out_of_area = "Debes estar en una zona de caza activa",
    animal_approaching = "Un animal se acerca al cebo!",
    animal_consumed_bait = "El animal consumio el cebo",
    no_animals_nearby = "No hay animales cercanos para atraer",

    -- Death/Damage
    died_contract_lost = "Moriste! Perdiste el contrato y %d XP",
    died_xp_lost = "Moriste durante la caza. Perdiste %d XP",
    bonus_failed_damage = "Objetivo bonus fallido: Recibiste dano",

    -- Delivery
    delivered_animals = "Entregaste %d animal(es)",
    still_need_animals = "Aun necesitas %d animal(es) mas",
    trophies_not_match = "Los trofeos no coinciden con el contrato",
    pelt_not_perfect = "Este contrato requiere pieles perfectas",
    no_valid_trophies = "No tienes trofeos validos para entregar",

    -- Rewards
    received_reward = "Recibiste $%d y %d XP de experiencia",
    reward_already_claimed = "Ya reclamaste tu recompensa",

    -- Level Up
    tracking_mastery_levelup = "Subiste a %s (Nivel %d)!",

    -- Bait Shop
    purchased_bait = "Compraste %s por $%d",
    not_enough_money_bait = "Necesitas $%s para comprar esto",
    failed_add_inventory = "No se pudo agregar al inventario",
    invalid_bait_item = "Item de cebo invalido",
    no_bait_item = "No tienes este cebo",
    failed_use_bait = "No se pudo usar el cebo",
    bait_location = "Ubicacion del cebo",

    -- Language
    language_reset = "Idioma restablecido al predeterminado",

    -- Tracking spam
    tracking_spam_warning = "Espera antes de rastrear de nuevo",
    trace_xp_set = "XP de rastreo establecido a %d (Nivel %d)",
    trace_xp_reset = "XP de rastreo restablecido",

    -- Contract status
    contract_failed_distance = "Contrato abandonado",

    -- Bait Shop Categories
    baitshop_cat_herbivore_name = "Herbivoros",
    baitshop_cat_herbivore_desc = "Cebos para ciervos, alces y otros herviboros",
    baitshop_cat_predator_name = "Depredadores",
    baitshop_cat_predator_desc = "Atrae osos, pumas y lobos",
    baitshop_cat_birds_name = "Aves",
    baitshop_cat_birds_desc = "Para aves de caza y pajaros",
    baitshop_cat_premium_name = "Premium",
    baitshop_cat_premium_desc = "Cebos de alta calidad para cazadores expertos",

    -- Bait Items
    baitshop_item_basic_herbivore_name = "Maiz Seco",
    baitshop_item_basic_herbivore_desc = "Cebo basico para herbivoros",
    -- ... add all bait item translations
}

Step 2: Register Language in Config

Step 3: Add Flag Image

Add a flag image to nui/assets/flags/:

  • File name: es.png

  • Size: 32x32 or 64x64 pixels

  • Format: PNG with transparency

Step 4: Restart Resource


Translation Keys Reference

Key
Description

hunting_actions

Prompt group label

open_hunting_menu

G key prompt

cancel_contract

H key prompt

deliver_products

L key prompt

open_bait_shop

J key prompt

Contract Messages

Key
Description
Parameters

contract_received

Shown after accepting

-

contract_finished

Mission complete notification

-

contract_cancelled

Manual cancel notification

-

contract_completed

Completion with rewards

$money, xp

contract_not_finished

Try to claim early

-

contract_failed_distance

Abandoned contract

-

Hunting Messages

Key
Description

no_active_contract

No contract active

no_trophies

No items to deliver

mission_not_found

Invalid mission data

Tracking Messages

Key
Description
Parameters

hunter_vision_active

HUD text during vision

-

no_tracks_found

No tracks in range

-

track_found

Track discovered

type, age, quality

no_contract_track

/tracking without contract

-

tracking_mastery_levelup

Level up notification

title, level

tracking_spam_warning

Cooldown warning

-

Bait Messages

Key
Description
Parameters

bait_placed_success

Bait placed

-

bait_out_of_area

Outside hunting zone

-

animal_approaching

Animal attracted

-

animal_consumed_bait

Bait consumed

-

no_animals_nearby

No animals in range

-

bait_location

Blip label

-

Death/Damage Messages

Key
Description
Parameters

died_contract_lost

Death with contract

xp_lost

died_xp_lost

Death during hunt

xp_lost

bonus_failed_damage

Took damage (bonus fail)

-

Delivery Messages

Key
Description
Parameters

delivered_animals

Successful delivery

count

still_need_animals

More needed

count

trophies_not_match

Wrong animal type

-

pelt_not_perfect

Need perfect pelt

-

no_valid_trophies

Nothing valid

-

Reward Messages

Key
Description
Parameters

received_reward

Reward claimed

$money, xp

reward_already_claimed

Double claim attempt

-

Bait Shop

Key
Description

purchased_bait

Purchase success

not_enough_money_bait

Insufficient funds

failed_add_inventory

Inventory full

invalid_bait_item

Invalid item

no_bait_item

No bait in inventory

failed_use_bait

Use failed


NUI Translations

The NUI also uses translations. These are sent via localeStrings in NUI messages:

The NUI JavaScript accesses translations via window.localeStrings:


Using Placeholders

Translations support %s (string) and %d (number) placeholders:


Locale Helper Functions

Server-Side

Client-Side


Best Practices

  1. Always provide fallbacks

  2. Keep translations consistent

    • Same tone across languages

    • Same placeholder order

  3. Test all languages

    • Use /resetlang to test language selection

    • Check all UI elements

  4. Handle missing translations

    • The system falls back to English

    • Missing keys show the key name


Last updated