[{"data":1,"prerenderedAt":492},["ShallowReactive",2],{"doc-global_essentials\u002Fmiscellaneous\u002Flocale":3},{"id":4,"title":5,"body":6,"description":16,"extension":484,"meta":485,"navigation":215,"path":488,"seo":489,"stem":490,"__hash__":491},"docs\u002Fdocs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flocale.md","Locale",{"type":7,"value":8,"toc":475},"minimark",[9,13,17,25,28,33,36,87,89,93,98,101,147,154,269,271,275,282,287,295,300,336,338,342,361,375,400,402,406,471],[10,11,5],"h1",{"id":12},"locale",[14,15,16],"p",{},"The locale system provides centralized text management for your game. Use it to store UI strings, messages, labels, and any text that may need translation.",[14,18,19,20,24],{},"Locale entries are defined in the engine editor under ",[21,22,23],"strong",{},"General > Locale",".",[26,27],"hr",{},[29,30,32],"h2",{"id":31},"locale-entries","Locale Entries",[14,34,35],{},"Each entry has:",[37,38,39,52],"table",{},[40,41,42],"thead",{},[43,44,45,49],"tr",{},[46,47,48],"th",{},"Field",[46,50,51],{},"Description",[53,54,55,67,77],"tbody",{},[43,56,57,64],{},[58,59,60],"td",{},[61,62,63],"code",{},"id",[58,65,66],{},"Key used to look up this text in code",[43,68,69,74],{},[58,70,71],{},[61,72,73],{},"val",[58,75,76],{},"The text value. Supports `",[43,78,79,84],{},[58,80,81],{},[61,82,83],{},"tags",[58,85,86],{},"Optional tags for filtering and organization",[26,88],{},[29,90,92],{"id":91},"api","API",[94,95,97],"h3",{"id":96},"gamegetlinelineid-params","game.getLine(lineId, params?)",[14,99,100],{},"Returns the localized string for the given ID, with placeholder substitution.",[37,102,103,115],{},[40,104,105],{},[43,106,107,110,113],{},[46,108,109],{},"Parameter",[46,111,112],{},"Type",[46,114,51],{},[53,116,117,132],{},[43,118,119,124,129],{},[58,120,121],{},[61,122,123],{},"lineId",[58,125,126],{},[61,127,128],{},"string",[58,130,131],{},"Locale entry ID",[43,133,134,139,144],{},[58,135,136],{},[61,137,138],{},"params",[58,140,141],{},[61,142,143],{},"Record\u003Cstring, any>",[58,145,146],{},"Values to substitute for `",[14,148,149,150,153],{},"Returns ",[61,151,152],{},"[lineId]"," if no entry is found (easy to spot missing translations).",[155,156,161],"pre",{"className":157,"code":158,"language":159,"meta":160,"style":160},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F Simple lookup\nconst label = game.getLine(\"battle_start\");\n\u002F\u002F \"The battle begins!\"\n\n\u002F\u002F With placeholders\nconst msg = game.getLine(\"damage_dealt\", { name: \"Goblin\", amount: 50 });\n\u002F\u002F Locale val: \"|name| took |amount| damage!\"\n\u002F\u002F Result: \"Goblin took 50 damage!\"\n","js","",[61,162,163,172,204,210,217,223,257,263],{"__ignoreMap":160},[164,165,168],"span",{"class":166,"line":167},"line",1,[164,169,171],{"class":170},"sJ8bj","\u002F\u002F Simple lookup\n",[164,173,175,179,183,186,190,194,197,201],{"class":166,"line":174},2,[164,176,178],{"class":177},"szBVR","const",[164,180,182],{"class":181},"sj4cs"," label",[164,184,185],{"class":177}," =",[164,187,189],{"class":188},"sVt8B"," game.",[164,191,193],{"class":192},"sScJk","getLine",[164,195,196],{"class":188},"(",[164,198,200],{"class":199},"sZZnC","\"battle_start\"",[164,202,203],{"class":188},");\n",[164,205,207],{"class":166,"line":206},3,[164,208,209],{"class":170},"\u002F\u002F \"The battle begins!\"\n",[164,211,213],{"class":166,"line":212},4,[164,214,216],{"emptyLinePlaceholder":215},true,"\n",[164,218,220],{"class":166,"line":219},5,[164,221,222],{"class":170},"\u002F\u002F With placeholders\n",[164,224,226,228,231,233,235,237,239,242,245,248,251,254],{"class":166,"line":225},6,[164,227,178],{"class":177},[164,229,230],{"class":181}," msg",[164,232,185],{"class":177},[164,234,189],{"class":188},[164,236,193],{"class":192},[164,238,196],{"class":188},[164,240,241],{"class":199},"\"damage_dealt\"",[164,243,244],{"class":188},", { name: ",[164,246,247],{"class":199},"\"Goblin\"",[164,249,250],{"class":188},", amount: ",[164,252,253],{"class":181},"50",[164,255,256],{"class":188}," });\n",[164,258,260],{"class":166,"line":259},7,[164,261,262],{"class":170},"\u002F\u002F Locale val: \"|name| took |amount| damage!\"\n",[164,264,266],{"class":166,"line":265},8,[164,267,268],{"class":170},"\u002F\u002F Result: \"Goblin took 50 damage!\"\n",[26,270],{},[29,272,274],{"id":273},"placeholders","Placeholders",[14,276,277,278,281],{},"Use ",[61,279,280],{},"|placeholder|"," syntax in locale values for dynamic content. All occurrences of a placeholder are replaced.",[14,283,284],{},[21,285,286],{},"Locale entry:",[155,288,293],{"className":289,"code":291,"language":292},[290],"language-text","id: \"item_acquired\"\nval: \"You found |count|x |item|!\"\n","text",[61,294,291],{"__ignoreMap":160},[14,296,297],{},[21,298,299],{},"Code:",[155,301,303],{"className":157,"code":302,"language":159,"meta":160,"style":160},"game.getLine(\"item_acquired\", { count: 3, item: \"Iron Sword\" });\n\u002F\u002F \"You found 3x Iron Sword!\"\n",[61,304,305,331],{"__ignoreMap":160},[164,306,307,310,312,314,317,320,323,326,329],{"class":166,"line":167},[164,308,309],{"class":188},"game.",[164,311,193],{"class":192},[164,313,196],{"class":188},[164,315,316],{"class":199},"\"item_acquired\"",[164,318,319],{"class":188},", { count: ",[164,321,322],{"class":181},"3",[164,324,325],{"class":188},", item: ",[164,327,328],{"class":199},"\"Iron Sword\"",[164,330,256],{"class":188},[164,332,333],{"class":166,"line":174},[164,334,335],{"class":170},"\u002F\u002F \"You found 3x Iron Sword!\"\n",[26,337],{},[29,339,341],{"id":340},"ability-description-integration","Ability Description Integration",[14,343,344,345,348,349,352,353,356,357,360],{},"The locale system integrates with ",[61,346,347],{},"buildAbilityEffectsDescription"," and ",[61,350,351],{},"buildAbilityMetaDescription",". Inline chooseOne\u002FchooseMany option values (e.g., ",[61,354,355],{},"\"fire\"",", ",[61,358,359],{},"\"all_targets\"",") are automatically looked up in the locale when generating descriptions.",[14,362,363,366,367,370,371,374],{},[21,364,365],{},"Example:"," An ability with ",[61,368,369],{},"damage_type: \"fire\""," and the ingame_description template ",[61,372,373],{},"\"Deal [v] [damage_type] damage\"",":",[376,377,378,388],"ul",{},[379,380,381,382,384,385],"li",{},"Without locale entry for ",[61,383,355],{},": renders as ",[61,386,387],{},"\"Deal 50 fire damage\"",[379,389,390,391,356,394,384,397],{},"With locale entry ",[61,392,393],{},"id: \"fire\"",[61,395,396],{},"val: \"Fire\"",[61,398,399],{},"\"Deal 50 Fire damage\"",[26,401],{},[29,403,405],{"id":404},"quick-reference","Quick Reference",[37,407,408,418],{},[40,409,410],{},[43,411,412,415],{},[46,413,414],{},"I want to...",[46,416,417],{},"Do this",[53,419,420,428,438,448,456],{},[43,421,422,425],{},[58,423,424],{},"Add locale entries",[58,426,427],{},"General > Locale in the editor",[43,429,430,433],{},[58,431,432],{},"Look up a string",[58,434,435],{},[61,436,437],{},"game.getLine(\"my_key\")",[43,439,440,443],{},[58,441,442],{},"Use placeholders",[58,444,445],{},[61,446,447],{},"game.getLine(\"key\", { name: \"value\" })",[43,449,450,453],{},[58,451,452],{},"Localize ability options",[58,454,455],{},"Add locale entries matching option IDs",[43,457,458,461],{},[58,459,460],{},"Ship plugin defaults",[58,462,463,464,466,467,470],{},"Add ",[61,465,12],{}," array to plugin ",[61,468,469],{},"data"," field",[472,473,474],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":160,"searchDepth":174,"depth":174,"links":476},[477,478,481,482,483],{"id":31,"depth":174,"text":32},{"id":91,"depth":174,"text":92,"children":479},[480],{"id":96,"depth":206,"text":97},{"id":273,"depth":174,"text":274},{"id":340,"depth":174,"text":341},{"id":404,"depth":174,"text":405},"md",{"plugin":486,"category":487,"page":12},"global_essentials","miscellaneous","\u002Fdocs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flocale",{"title":5,"description":16},"docs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flocale","J3E201fheZVa2howc5ptY5MypXQzcsQXqK0d5itALek",1779582261622]