New in Synchronet v3.20, the text.ini
file is an optional configuration file that a sysop can create in their Synchronet ctrl
directory to over-ride one or more string values in the text.dat
file or in some JavaScript files (e.g. default.js
).
The text.ini
method of text.dat
customization has the following advantages over modifying the text.dat
file itself:
The text.ini
method of text.dat
customization has the following advantages over modification using Baja or JavaScript code:
text.dat
strings might be used (e.g. before your script could execute and replace them)
Follow the following steps to customize your text.dat
strings using the text.ini
file.
Find a string you want to over-ride in the ctrl/text.dat
file. Example:
"\1_\1?\1b\1hE-mail (User name or number): \1w" 010 Email
The “text ID” of the string (“Email” in this example) follows the double-quoted string value and the text number (10, in this example).
Edit the ctrl/text.ini
file (create, if it doesn't already exist) using a text editor.
Add the line:
ID: string
where “ID” is the text id of the text string you are customizing and double-quotes around the string value are optional but recommended:
Email: "\1_\1?\1c\1hE-mail (User name or number): \1w"
text.ini
file.text.ini
file is limited to a maximum of 1023 characters.
At the minimum, users will have to logoff and back on to see any text.ini
string changes. If a server doesn't automatically recycle or otherwise reload configuration files, you may need to force a recycle or restart of the server manually.
Follow the following steps to customize JavaScript strings using the text.ini
file.
The text string you wish to customize must be wrapped in a call to gettext()
in a JavaScript file (e.g. *.js
, *.ssjs
, or *.xjs
).
ctrl/text.ini
file (create, if it doesn't already exist) using a text editor.[JS]
section to end of the text.ini
file, if it doesn't already exist.=
) then the new custom string, or colon (:
) and the new custom string as a string literalExample
[JS] Find Text in Messages = find yo text bro
Variants of the text.ini
file are supported for multiple-language support: ctrl/text.lang.ini
. These files use the same format as text.ini
, but are required to include a LANG
key/value pair (to specify the name of the language) and will be automatically loaded upon logon for terminal server user's that have chosen that alternate language for their user account.
The alternate language text.lang.ini
files also support the [JS]
section for translated JavaScript strings.