Translation

circle-info

You can translate to language of your choice, but the script have a 7 lenguages default


How to translate to other lenguage

Go to "ws-doorlock/locales" and create a .lua archive with the name of your choice, but remeber that the name should not have a spaces or invalid characters. Copy the code below this text and paste in the archive lua.

local locales = {
    ["door_system"] = "Door System",
    ["create_door"] = "βž• Create Door",
    ["create_desc"] = "Point at the door and set the permissions",
    ["instructions"] = "πŸ” Point at the object you want to register and press ENTER.",
    ["cancel"] = "❌ Door creation canceled.",
    ["invalid_job"] = "❌ Invalid job. Use a valid job or 'all'.",
    ["invalid_grade"] = "❌ Invalid minimum grade.",
    ["success"] = "βœ… Door successfully registered.",
    ["edit_desc"] = "Edit permissions and status of a nearby registered door",
    ["edit_door"] = "✏️ Edit nearby door",
    ["edit_success"] = "✏️ Door successfully edited.",
    ["edit_cancel"] = "❌ Edit canceled.",
    ["edit_error"] = "πŸšͺ No nearby registered door found.",
    ["dont_access"] = "🚫 You do not have access to this door.",
    ["open"] = "Open door",
    ["close"] = "Close door",
    ["door_closed"] = "πŸ”’ Door closed.",
    ["door_opened"] = "πŸ”“ Door opened.",

    ["input_title"] = "Create Door",
    ["input_job_label"] = "Allowed job (e.g., police, or 'all' for everyone)",
    ["input_grade_label"] = "Minimum grade",
    ["edit_title"] = "Edit Door",
    ["input_closed_label"] = "Closed by default?",

    ["locale_not_found"] = "⚠️ Language file not found",
    ["doors_loaded"] = "πŸ”’ Doors loaded",
    ["dont_perms"] = "🚫 You do not have permission to use this command.",
    ["doors_json_not_found"] = "πŸšͺ doors.json not found, starting empty",

    ["no_permission_create"] = "❌ [%s] tried to use /createdoor without permission.",
    ["no_permission_delete"] = "❌ [%s] tried to delete a door without permission.",
    ["door_deleted"] = "πŸ—‘οΈ Door %d deleted by admin %s",

    ["no_permission_create_door"] = "❌ [%s] tried to create a door without permission.",
    ["door_created"] = "πŸšͺ New door created",

    ["no_permission_edit"] = "❌ [%s] tried to edit a door without permission.",
    ["door_edited"] = "πŸšͺ Door %d edited: %s",
    ["invalid_edit_index"] = "❌ Invalid edit attempt: index %d does not exist.",

    ["edit_action"] = "What do you want to do?",
    ["edit_option_edit"] = "Edit door",
    ["edit_option_delete"] = "Delete door",
    ["press_to_edit"] = "Press ENTER to edit",
    ["confirm_delete_title"] = "Delete Door",
    ["confirm_delete_desc"] = "Are you sure you want to delete this door?",
    ["delete_cancel"] = "Deletion canceled",
    ["log_door_deleted"] = "πŸ”΄ Door deleted by [%s - %s]: %s",
    ["invalid_delete_index"] = "Invalid door ID when trying to delete: %s",

    ["log_door_created"] = "Door created by [%s - %s]: %s",
    ["log_door_edited"] = "Door edited by [%s - %s]: %s",
    ["change_state"] = "πŸ”„ Door state changed",
    ["closed_log"] = "πŸ”’ Closed",
    ["open_log"] = "πŸ”“ Open",
    ["changed_state"] = "πŸ”„ State changed by [%s - %s]: ID: %d | New state: %s",
    ["edit_mode_enabled"] = "✏️ Edit mode enabled.",
    ["edit_mode_disabled"] = "✏️ Edit mode disabled.",
    ["info_door_deleted"] = "πŸ—‘οΈ Door deleted",

    ["create_door_key"] = "Create door (Admin)",

    ["view_doors"] = "View doors",
    ["view_doors_desc"] = "View all doors registered in the system",
    ["teleported"] = "Teleported successfully"
}

return locales

Translate all of the text in the " to the lenguage of your election.

How to change in the config

Go to config.lua, and inside there, change the locale to your locale name.

Last updated