Multi laguage support for Script Debugger?

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Multi laguage support for Script Debugger?

Postby murgh » Tue Jul 26, 2016 12:15 pm

I tried to put variables defined in base-language.txt into the script debuggers Game.DebugOut() and print() functions,
but instead of the text it shows the name of the variable used.

base-language.txt entry:

Code: Select all

scriptdebugger_searching         Searching for fields...


in the .lua file:

Code: Select all

print("scriptdebugger_searching") or Game.DebugOut("scriptdebugger_searching")


will output:

Code: Select all

scriptdebugger_searching


in the debug window, instead of:

Code: Select all

Searching for fields...



- Trying without quotes in the .lua file:

Code: Select all

print(scriptdebugger_searching)


will output:

Code: Select all

(nil)


Trying to make it a tooltip entry in the baselanguage file,
then setting the tooltip with the script and
then reading out the tooltip contents also doesn't work.
The tooltip entry in the .prison file will say

Code: Select all

Tooltip       tooltip_searching


instead of

Code: Select all

Tooltip       "Searching for fields..."


So this is of no use either.
I'm wondering if there is a way to have multi language compatibility for script output at all
without having to define all text variables in the script itself. Something which is undesirable.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 0 guests