Works easy by just including it and using GetText where a string needs to be translated. The idea mainly works for "static" Messages/Dialogs you send to your player.. and only these it's for.
(As far as of 15.12.19 a few days after creating: No testing so far, but should actually work flawless in TEXT mode (not DIALOG Mode)
Example: format(GetText(Languages:p1, int p2, int TEXT_TYPE, int p4)); NOTE: this is just to show you the types and does not work in pawn that way Description of params
- p1: Language enum name - you define them yourself and use the current ones defined under LAGUAGES but if you pass numbers use ':' tag. Like ':0'
- p2: Message ID (or enum name) - you define them yourself and use the current ones defined under TEXT_KEYS
- TEXT_TYPE: (what kind of text to read? for dialog (..text/dialogs/), or single line string like.. (text/*.txt) ? (0 - 1)
- p4: (Use if dialog only) What to read (int: 0 - 3) from 0=title to 3=BUTTON NO RESPONSE) 1 by default and will always return the dialog body
- Uses "scriptfiles/text/" and "scriptfiles/text/dialogs" to read the whole dialog data from the file named like the TextID.
- REMINDER: TextID (example: SCM_BAN_WRONGPASSWORD will be the dialog translation-file name)
- One files holds the whole content like title and button text and it's stored there the following way:
Remember that this is just a description of how the lines inside a translation-file should look like! Titles MUST be in line 0 (the first) ! The buttons should be the last two lines but can be some lines between. DO NOT PUT THE BUTTON DEFINITIONS SOMEWHERE IN A LINE (between the words we read as content) '''BOF (dialogs/SCM_BAN_WRONGPASSWORD.txt)
title line
content can be how long you want it from now..
like here a bit more
and here
and there
and may all the way
back here in the file..
#button0deintext // < right button v
#button1deintext // < left button button
best songs 2019: take me back to london, fine (mike shinoda) and go check out bagpipes from bagdad lmao!
'''EOF the last line will be displayed in body part of dialog too.. we read out between the lines and only look for defines we really need, no matter where in the line!
and a simple String of text is stored in text/YOUR_LANGUAGE.txt and from there you can define each TEXT_KEY to each string you want.