{"id":41125,"date":"2024-02-05T09:20:21","date_gmt":"2024-02-05T08:20:21","guid":{"rendered":"https:\/\/esx-scripts.com\/?p=41125"},"modified":"2026-08-09T14:39:02","modified_gmt":"2026-08-09T12:39:02","slug":"fivem-scripts-translation","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pl\/fivem-scripts-translation\/","title":{"rendered":"How to Translate FiveM Scripts Safely (Manual + AI)"},"content":{"rendered":"<p><!-- fivemx-blog-portfolio-wave3:2026-08-09:fivem-scripts-translation --><\/p>\n<p><strong>Translate the resource&#8217;s existing locale values while preserving keys, placeholders, control codes and file syntax.<\/strong> Manual editing gives maximum control; AI can accelerate a reviewed batch. Neither method makes it safe to translate every quoted string in source code.<\/p>\n<p><em>Reviewed 9 August 2026 against the official Cfx.re <a href=\"https:\/\/docs.fivem.net\/docs\/scripting-reference\/resource-manifest\/resource-manifest\/\" rel=\"nofollow noopener\" target=\"_blank\">resource-manifest reference<\/a> I <a href=\"https:\/\/docs.fivem.net\/docs\/developers\/sandbox\/\" rel=\"nofollow noopener\" target=\"_blank\">sandbox guidance<\/a>, plus the current <a href=\"https:\/\/npp-user-manual.org\/\" rel=\"nofollow noopener\" target=\"_blank\">Notepad++ manual<\/a> I <a href=\"https:\/\/developers.deepl.com\/docs\" rel=\"nofollow noopener\" target=\"_blank\">DeepL documentation<\/a>.<\/em><\/p>\n<h2>Find the supported locale system<\/h2>\n<p>Read the resource documentation and <code data-no-translation=\"\">fxmanifest.lua<\/code>. Look for locale directories, JSON\/Lua dictionaries, NUI translation files and a language setting. Use the system the creator ships. Do not add <code data-no-translation=\"\">lua54<\/code> as a translation fix; that manifest option is deprecated and unrelated to localization.<\/p>\n<h2>Back up and inventory visible strings<\/h2>\n<ol>\n<li>Copy the resource or create a version-control branch.<\/li>\n<li>Record the exact release and configured language.<\/li>\n<li>List player-visible labels, notifications, menu text and help messages.<\/li>\n<li>Exclude keys, event names, commands, database columns, file paths and identifiers unless the documentation explicitly marks them translatable.<\/li>\n<li>Create a glossary for framework terms, jobs, items and server terminology.<\/li>\n<\/ol>\n<h2>Manual method: edit values only<\/h2>\n<p>In a syntax-aware editor such as Notepad++, change the human-readable value on the right side while keeping the key and structure intact.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">{\n  \"garage_open\": \"Open garage\",\n  \"price_label\": \"Price: %s\"\n}<\/code><\/pre>\n<p>For another language, translate <code data-no-translation=\"\">Open garage<\/code> I <code data-no-translation=\"\">Price<\/code>, but preserve <code data-no-translation=\"\">garage_open<\/code>, <code data-no-translation=\"\">price_label<\/code> I <code data-no-translation=\"\">%s<\/code>. Keep escape sequences, quotes, commas, braces, color codes such as <code data-no-translation=\"\">~r~<\/code>, and format tokens such as <code data-no-translation=\"\">%s<\/code>, <code data-no-translation=\"\">%d<\/code> Lub <code data-no-translation=\"\">{name}<\/code> exact.<\/p>\n<h2>AI method: send a constrained values-only batch<\/h2>\n<p>Provide only the locale entries needed for translation\u2014not the whole private resource, server configuration, license key, webhook, player data or database export. State the source and target language, glossary and invariant tokens. Require the same structured format and ask the model to leave keys and all placeholders unchanged.<\/p>\n<p>AI output is a draft. Models can rename a key, alter punctuation, translate a command, drop a placeholder or return invalid JSON\/Lua while sounding confident. Review the diff entry by entry.<\/p>\n<h2>Validate before starting the resource<\/h2>\n<ul>\n<li>Parse JSON with a JSON parser and Lua with the project&#8217;s supported lint\/test workflow.<\/li>\n<li>Compare the complete key set with the source locale.<\/li>\n<li>Check exact placeholder and control-code parity per entry.<\/li>\n<li>Search for accidental changes to commands, event names and URLs.<\/li>\n<li>Inspect the diff for added commentary or Markdown fences.<\/li>\n<\/ul>\n<h2>Test in the UI<\/h2>\n<p>Start the translated locale on staging and walk through every visible flow: menu, notification, error, confirmation, input validation and help text. Check clipping, line breaks, accented characters, plural\/context errors and right-to-left behavior where applicable. Review browser\/NUI, F8 and server logs.<\/p>\n<h2>Build a reusable translation memory<\/h2>\n<p>Store approved source\/value pairs, glossary decisions and reviewer notes outside the vendor package. When the resource updates, diff the new source locale against the prior version and translate only added or changed keys. Never overwrite a new vendor locale blindly with an old full file.<\/p>\n<h2>Rollback safely<\/h2>\n<p>Keep the original locale and configuration available. If parsing, UI or runtime behavior regresses, restore the known-good files, restart the resource and confirm the default language works. Correct the translation in a new version rather than editing production without a diff.<\/p>","protected":false},"excerpt":{"rendered":"<p>Translate locale files manually or with AI while preserving placeholders, commands, syntax, UI layout and rollback safety.<\/p>","protected":false},"author":1,"featured_media":180133,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2877,1899],"tags":[3001],"class_list":["post-41125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-fivem-job-scripts","category-tutorials","tag-fivem-script"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/41125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/comments?post=41125"}],"version-history":[{"count":3,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/41125\/revisions"}],"predecessor-version":[{"id":215701,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/41125\/revisions\/215701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media\/180133"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media?parent=41125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/categories?post=41125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/tags?post=41125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}