Translation Reference
Last Updated Time: 09/07/2023
Overview
Implement translation localization by referencing the translation key value Key.
UI Referenced Translations
Enable the EnableLocalText property of the control.
The format for the Text uses the symbol @ + translation key value Key: @translation_keywords_cannot_be_repeated
As shown below:
Scripts Referenced Translations
-- Get Translations
function get_text(text_id)
if text_id == nil then
return text_id
else
local gui = nx_value("gui")
text_id = nx_string(text_id)
if nx_is_valid(gui) then
return nx_string(gui.TextManager:GetText(text_id))
else
return text_id
end
end
end
function main_form_open(form)
form.btn_1.Text = nx_widestr(get_text("translation_keywords_cannot_be_repeated"))
end