OpenXcom Forum

Modding => Help => Topic started by: Alpha Centauri Bear on December 21, 2023, 05:04:15 pm

Title: Correct way to introduce new string variable
Post by: Alpha Centauri Bear on December 21, 2023, 05:04:15 pm
What is the easiest and/or more correct way to introduce new translatable string variable?
There are few language files: one in common/Language others are in standard/xcom1, standard/xcom2, etc.

1. Where should this variable go?
2. Do I need to add it to ALL translation files at once? Would it harm them if not?
3. An easy tool to insert it to multiple translation files or it is a manual modder chore?

Thank you.
Title: Re: Correct way to introduce new string variable
Post by: Meridian on December 21, 2023, 05:49:11 pm
What is the easiest and/or more correct way to introduce new translatable string variable?

manually

There are few language files: one in common/Language others are in standard/xcom1, standard/xcom2, etc.

1. Where should this variable go?

depends whether it's a translation common to openxcom, or specific to mods, e.g.

STR_OPENXCOM = OpenXcom

would naturally fo to "common"

STR_ENGINEERS: "Engineers"
and
STR_ENGINEERS: "Technicians"

would naturally go to standard/xcom*

2. Do I need to add it to ALL translation files at once? Would it harm them if not?

OXC and OXCE add only en-GB and en-US... other languages are maintained by Transifex

in your fork, you're free to do whatever makes sense to your case

3. An easy tool to insert it to multiple translation files or it is a manual modder chore?

it's a DEV chore, not a modder chore
I use Notepad++
Title: Re: Correct way to introduce new string variable
Post by: Alpha Centauri Bear on December 21, 2023, 06:02:45 pm
Thanks. I thought about the same.