String Editor – Arma Reforger
Lou Montana (talk | contribs) m (Text replacement - "|Modding|Tools|Official Tools" to "|Modding|Official Tools") |
Lou Montana (talk | contribs) m (Add PlayStation (5)) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 138: | Line 138: | ||
To use arguments (formatted) text, use '''%1''', '''%2''', etc to include argument 1, 2, etc in the text. to display the percentage sign itself (%), use '''%%'''. Composed strings should be restricted to the bare minimum and used only when necessary for translation reasons. | To use arguments (formatted) text, use '''%1''', '''%2''', etc to include argument 1, 2, etc in the text. to display the percentage sign itself (%), use '''%%'''. Composed strings should be restricted to the bare minimum and used only when necessary for translation reasons. | ||
''' | '''Localised string''' | ||
< | <enforce> | ||
// formatted text example | // formatted text example unlocalised | ||
string testName = "Peter"; | string testName = "Peter"; | ||
PrintFormat("Hello %1, how are you?", testName); // displays "Hello Peter, how are you?" | PrintFormat("Hello %1, how are you?", testName); // displays "Hello Peter, how are you?" | ||
Line 147: | Line 147: | ||
string testName = "Peter"; | string testName = "Peter"; | ||
PrintFormat("#AR-Test", testName); // displays "Hello Peter, how are you?" as well | PrintFormat("#AR-Test", testName); // displays "Hello Peter, how are you?" as well | ||
</ | </enforce> | ||
{{Feature|important|If a string contains any '''%1''' arguments, they '''must''' be documented in the '''Comment''' field!}} | {{Feature|important|If a string contains any '''%1''' arguments, they '''must''' be documented in the '''Comment''' field!}} | ||
Line 206: | Line 206: | ||
# In Workbench select Options | # In Workbench select Options | ||
# In newly open window select Game project | # In newly open window select Game project | ||
# In the Configuration dropbox, select the desired platform (Headless, PC, Xbox, PS5, etc) | |||
# Navigate to Widget Manager Settings → String Tables → String Table Definition and here: | # Navigate to Widget Manager Settings → String Tables → String Table Definition and here: | ||
#* String Table Source - select the newly created file | #* String Table Source - select the newly created file | ||
Line 221: | Line 222: | ||
# Save changes by using File → Save (or {{Controls|Ctrl|S}}) | # Save changes by using File → Save (or {{Controls|Ctrl|S}}) | ||
# Go to Table → Build Runtime Table (or {{Controls|Ctrl|B}}). '''Only''' after the following confirmation is the text ready to be used in game. | # Go to Table → Build Runtime Table (or {{Controls|Ctrl|B}}). '''Only''' after the following confirmation is the text ready to be used in game. | ||
{{Messagebox|'''Recommended read:''' Detailed tutorial on creating localisation in mod can be found on [[Arma_Reforger:Mod_Localisation|'''Mod Localisation''']] page.|📖|lightgrey}}{{GameCategory|armaR|Modding|Official Tools}} | |||
{{GameCategory|armaR|Modding|Official Tools}} |
Latest revision as of 12:28, 12 December 2024
Open String Editor
- In Resource Manager, select Editors → String Editor. In the newly open window select File → Open and in the newly open dialog navigate to the wanted *.st file.
- alternatively, search for the *.st file in Resource Manager's Resource Browser tab and open it by double-clicking it.
Translation Workflow
Status | Operation | Editable | If the string is correct | If the string is incorrect |
---|---|---|---|---|
DEVELOPMENT_PENDING | Fill Target_en_us as translation reference | Change the status to DEVELOPMENT_DONE | Fix it directly in the Target_en_us field | |
DEVELOPMENT_DONE | Feature development end, translation requirement confirmation | Change the status to PROOFREADING_PENDING | Set the status back to DEVELOPMENT_PENDING and edit the Target_en_us field | |
PROOFREADING_PENDING | Proofreaders acknowledgement | Change the status to PROOFREADING_DONE | Unlock the string, set the status back to DEVELOPMENT_PENDING and edit the Target_en_us_edited field | |
PROOFREADING_DONE | Proofreaders validation | Change the status to TRANSLATION_PENDING | Unlock the string, set the status back to DEVELOPMENT_PENDING and edit the Target_en_us_edited field | |
TRANSLATION_PENDING | Translators acknowledgement | Change the status to TRANSLATION_DONE | Unlock the string, set the status back to DEVELOPMENT_PENDING and edit the Target_en_us_edited field | |
TRANSLATION_DONE | Translators validation | Nothing | Unlock the string, set the status back to DEVELOPMENT_PENDING and edit the Target_en_us field |
ID Convention
A translation id must follow a certain convention. Its name is constituted of specific parts in a specific order, and these parts are separated with a dash ( - ):
Name | Description |
---|---|
Game/Product | Game or Project prefix: AR for Arma Reforger, ENF for Enfusion |
Game Project | Optional, subsequential game project code (e.g a DLC, etc) |
Name | PascalCased string name - e.g MyNewWeapon, SplendidActionOnTruck
Name prefixes/suffixes can exist through the usage of underscores ( _ ):
Iterators are part of the name section too, e.g AOSettings_1, AOSettings_2, AOSettings_3 |
Case | Optional, defines if the string MUST remain uppercase or lowercase.
Can be one of:
|
Platform | Used to determine a string that is only present on a certain platform, as opposed to a string that is present on PC.
Can be one of:
|
Naming Convention
- use meta naming; the id must not be a 1:1 of the original text
- e.g: #AR-ExitConfirmation and not #AR-DoYouWantToQuit
- do not use any of:
- trademarks (use a generic name)
- profanities (for obvious reasons)
- write in English
Examples
- ENF-Settings
- AR-MainMenu
- AR-MainMenu_Options
- AR-OFP-MainMenu_Options_RefreshRate-UC-PS
Writing Convention
A translation text must follow some rules and advices to be valid:
The in-game text should always refer to a stringtable and never be written directly in UI/data.
Do not hardcode:
- text in UI
- text in data (config)
- text in code
- text in image (unless it is part of the lore)
- numeric format (e.g 1000 could be written 1,000 or 1 000 in another language)
- date format (2001-12-01, 01/12/2001, 12/01/2021 etc)
- percentage values (25%, 25 %, %25 etc)
Tips
To use arguments (formatted) text, use %1, %2, etc to include argument 1, 2, etc in the text. to display the percentage sign itself (%), use %%. Composed strings should be restricted to the bare minimum and used only when necessary for translation reasons.
Localised string
Do not assemble multiple parts to make a sentence, as such construction might be invalid in another language:
Bad Example | Good Example | Explanation |
---|---|---|
Hold Space to Take weapon
|
Hold Space to take weapon
|
The translator does not always know that the value is to be used in a composition
The translation itself might not have been thought for this usage in the first place |
Remaining time: 30 seconds
|
Remaining time: 30 seconds
|
|
Heavy Machinegun
|
Heavy Machinegun
|
Some languages place adjectives in a different order; such translation must then be done in one piece |
Create a Stringtable File
Follow these steps to create a new *.st file:
- In Resource browser select a folder where you want to create a new *.st file
- Use right mouse button to open an option and here select GUI String table
- Set the name of the file
- Choose StringTable class and confirm
- A new *.st was created - all there is to do now is to assign this *.st file to the project
- In Workbench select Options
- In newly open window select Game project
- In the Configuration dropbox, select the desired platform (Headless, PC, Xbox, PS5, etc)
- Navigate to Widget Manager Settings → String Tables → String Table Definition and here:
- String Table Source - select the newly created file
- Languages - press the "+" button to add all desired languages.
Add a New Localised String
- Open String Editor
- Write an Id (stringtable entry key) into the insert section
- Press insert, the new container is created
- Select the new container in the list of containers
- In the Details section, add the original text in the Target_en_us field.
- Fall all other necessary details like Comment, Max Length of the text, all matching labels and so on. Details about those items are in this section of tutorial.
- Save changes by using File → Save (or Ctrl + S)
- Go to Table → Build Runtime Table (or Ctrl + B). Only after the following confirmation is the text ready to be used in game.