Stringtable.csv: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Redirection from CSV_File_Format - Stringtables)
m (Some wiki formatting)
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Purpose==
{{TOC|side}}
== Purpose ==
 
Stringtables are used to make internationalization easier for the game. They are used in addons, missions, and scripts.
Stringtables are used to make internationalization easier for the game. They are used in addons, missions, and scripts.


Line 6: Line 8:
Instead of using message strings directly in the code you are using a variable. This variable will then contain the actual string, read from stringtable.csv, with the language that's being read depending on the game settings.
Instead of using message strings directly in the code you are using a variable. This variable will then contain the actual string, read from stringtable.csv, with the language that's being read depending on the game settings.


==CSV (comma separated values)==
The file stringtable.csv is an ASCII text file, and can be edited with any text editor. One ''could'' theoretically use a spreadsheet program (like Excel) to edit the file, but that would be serious overkill. '''DO NOT'' use a word processor (like MS-Word, or Write) to edit this file though, as it will corrupt it, unless you are very knowledgeable and careful.


*[[Operation Flashpoint]] and [[VBS1]] use ANSI encoding, The codepage is defined by the font used.  
== CSV Format ==
*[[Armed Assault]] and [[VBS2]] use [http://en.wikipedia.org/wiki/UTF-8 UTF-8] encoding or [http://en.wikipedia.org/wiki/Unicode Unicode] (in which case it will be converted to UTF-8 when loading).
 
*[[Operation Flashpoint]] and [[VBS1]] cannot accept utf encoding. You need to convert back to ansi (eg remove the 3 byte utf tag at beginning of file when converting back the the real game).
The '''Stringtable.csv''' file is an ASCII text file, and can be edited with any text editor.
*Arma1 accepts csv tables in ansi format
One ''could'' theoretically use a spreadsheet program (like Excel) to edit the file, but that would be serious overkill.
*Arma2 and Arma3 accept csv, but uses [[Stringtable.xml]] in preference. For whatever reason, Bis have destroyed the default language. It is no longer possible to simply state
'''DO NOT'' use a word processor (like MS-Word, or Write) to edit this file though, as it will corrupt it, unless you are very knowledgeable and careful.
 
{{Feature|informative|CSV stands for Comma-Separated Values. Using e.g Microsoft Excel to edit this file ''may'' corrupt the file, as some language settings will use a semicolon {{hl|;}} instead of a comma {{hl,}}.}}


* [[:Category:Operation Flashpoint|{{ofp}}]] uses {{Link|https://en.wikipedia.org/wiki/ANSI}} encoding, the codepage is defined by the font used.
** [[:Category:Operation Flashpoint|{{ofp}}]] cannot accept UTF encoding. You need to convert back to ANSI (e.g remove the 3 byte UTF "BOM" (byte order mark) tag at beginning of file when converting back the the real game).
* [[:Category:ArmA: Armed Assault|{{arma1}}]] accepts ANSI, {{Link|https://en.wikipedia.org/wiki/Unicode}} and {{Link|https://en.wikipedia.org/wiki/UTF-8}} encoding (Unicode will be converted to UTF-8 on load)
* {{arma2}} and {{arma3}} both accept CSV but use [[Stringtable.xml]] in preference. For whatever reason, [[Bohemia Interactive]] have destroyed the default language. It is no longer possible to simply state
  STR_ANYTHING,Some Name
  STR_ANYTHING,Some Name
and have all languages accept it. You will get a 'blank' if a specific language (e.g 'german') is not endlessly repeated as well.
== Function ==
CSV files are used as string lookup tables.
Although the engine uses other files with the extension CSV, the file for missions, addons, and campaigns is 'stringtable.csv' and '''must''' be located in the primary folder of the mission/addon/campaign.


and have all languages accept it. You will get a 'blank' if 'german' (eg) is not endlessly repeated as well
In point of fact, the naming convention inside a csv is such that the first three letters of any variable (more later) '''must''' begin with {{hl|STR}}, and referenced in mission.sqm, description.ext or anywhere else as {{hl|$STRsomething}}.


==Function==
The characters {{hl|STR}} tell the engine to look in 'stringtable.csv' as opposed to use the literal string value.
CSV files are used in Operation Flashpoint exclusively as a string lookup tables.


Although the engine uses other files with the extension CSV, the file for missions, addons, and campaigns is 'stringtable.csv' and '''must''' be located in the primary folder of the mission, the addon, or, the campaign.


In point of fact, the naming convention inside a csv is such that the first three letters of any variable (more later) must begin with STR, and referenced in mission.sqm, description,ext or anywhere else as $STRsomething.
== Format ==


The characters STR tell the engine to look in 'stringtable.csv' as opposed to somewhere else.
=== Language Columns ===


==Format==
The basic idea is that every language is assigned one column. (e.g. English has one column, French has another.) The order of the columns doesn't matter. (i.e. whether English comes first, or French, or Czech, is irrelevant). However, when game language doesn't match any of the languages listed in stringtable, the first column is selected by default. Therefore it is recommended to use English there.
===Language Columns:===
The basic idea is that every language is assigned one column. (e.g. English has one column, French has another.) The order of the columns doesn't matter. (i.e. whether English comes first, or French, or Czech, is irrelevant). However, when game language doesn't match any of the languages listed in stringtable, the first column is selected by default. Therefore it's recommended to use English there.


The very first line of any csv must contain a statement like this:
The very first line of any csv must contain a statement like this:
Line 47: Line 57:
  STR_ONE,  One,    ,    Une
  STR_ONE,  One,    ,    Une


===Blank Strings:===
=== Blank Strings ===
 
Note some interesting and highly flexible aspects of the above syntax.
Note some interesting and highly flexible aspects of the above syntax.


There is '''no''' French equivalent for STR_GOOD. Nor is there a Turkish equivalent for ONE. The engine will default to the 2nd column. It happens to be 'English', but need not be.
There is '''no''' French equivalent for {{hl|STR_GOOD}}, nor is there a Turkish equivalent for {{hl|STR_ONE}}. The engine will default to the 2nd column. It happens to be 'English', but need not be.
 
'''ArmA:''' In ArmA this is different. If your country column exists, it will use that string, even if it is blank and not default to the 2nd column. So do not include languages in the LANGUAGE row which you are not utilising yet.


'''ArmA:''' In ArmA this is different. If your country column exists, it will use that string, even if it is blank and not default to the 2nd column. So do not include languages in the LANGUAGE row, which you are not utilising yet.
=== Default Language Column ===


===Default Language Column:===
The second column (the first 'string') is the default. Because of that, it is important that ''all'' of the 2nd columns are filled.  
The second column (the first 'string') is the default. Because of that, it is important that ''all'' of the 2nd columns are filled.  


The second column doesn't ''have'' to be English - it can be any language the author is most comfortable with, and for which he will be able to supply ''all'' the required definitions. In that case though, he will have to adjust the "LANGUAGE, ..." column definition at the top of the file.
The second column does not ''have'' to be English - it can be any language the author is most comfortable with, and for which he will be able to supply ''all'' the required definitions.
In that case though, he will have to adjust the "LANGUAGE, ..." column definition at the top of the file.


'''ArmA:''' In ArmA, if your language column is missing, then it will default to the game distributor language column, if it exists.
'''ArmA:''' In ArmA, if your language column is missing, then it will default to the game distributor's language column, if it exists.
So if you own the German version of the game and a German column exists in any column and your chosen language is not in any column, then German will be used, even if German is not in the 2nd column.
So if you own the German version of the game and a German column exists in any column and your chosen language is not in any column, then German will be used, even if German is not in the 2nd column.


===Commas and Quotes:===
=== Commas and Quotes ===
To separate strings from one another, commas are used. String do not have to be enclosed with quotation marks. In the case that commas are needed in the string definition itself, then that string would have to be enclosed by quotes (e.g. "Merde, Encore" you ''would'' need quotes.)
 
To separate strings from one another, commas are used. String do not have to be enclosed with quotation marks.
In the case that commas are needed in the string definition itself, then that string would have to be enclosed by quotes (e.g. "Merde, Encore" you ''would'' need quotes).


===Leading/Trailing Spaces:===
=== Leading/Trailing Spaces ===
When defining a string, the text used by the engine is from the ''first non space character'' after a comma, until the ''last non space character'' before the next comma (or end of line). This would be familiar to many programmers as the Trim() function.
 
When defining a string, the text used by the engine is from the ''first non space character'' after a comma, until the ''last non space character'' before the next comma (or end of line).
This would be familiar to many programmers as the Trim() function.


Thus
Thus
Line 76: Line 93:
This feature is helpful if you want to keep columns aligned (tabbed), to keep better track of the columns.
This feature is helpful if you want to keep columns aligned (tabbed), to keep better track of the columns.


==Usage==
 
== Usage ==
 
Definition in stringtable.csv:
Definition in stringtable.csv:
  LANGUAGE,    English,          German
  LANGUAGE,    English,          German
Line 87: Line 106:
Activations and conditions too.
Activations and conditions too.


:* ArmA
{{arma}}
_text = ([[localize]] "STR_MOVETO") + " " + ([[localize]] "STR_AIRPORT");
<sqf>_text = localize "STR_MOVETO" + " " + localize "STR_AIRPORT";</sqf>


:* OFP
{{ofp}}
  _text = $STR_MOVETO + " " + $STR_AIRPORT
  _text = $STR_MOVETO + " " + $STR_AIRPORT
<!-- can't <sqf> this one -->


=== [[Description.ext|description.ext]] ===
=== [[Description.ext|description.ext]] ===
  $STR_AIRPORT
 
<syntaxhighlight lang="cpp">
  "$STR_AIRPORT"
</syntaxhighlight>


=== mission.sqm ===
=== mission.sqm ===


Markers, texting effects, mission name, ...:
Markers, texting effects, mission name, etc:


{{Important|Note: If adding string table entry through the mission editor, the proper syntax is automatically added to the mission.sqm, if you are converting a mission from OFP to ArmA, you may need re-add the string table to avoid the "scalar bool array string 0xe0ffffef" error}}
{{Feature|important|
If adding string table entry through the mission editor, the proper syntax is automatically added to the mission.sqm.
If you are converting a mission from OFP to ArmA, you may need re-add the string table to avoid the {{hl|"scalar bool array string 0xe0ffffef"}} error.
}}


:* OFP
{{ofp}}
  @STR_AIRPORT
  @STR_AIRPORT


:* ArmA
{{arma}}
  "@STR_AIRPORT"
  "@STR_AIRPORT"


==Comments==
 
*Arma: Arma doesn't appear to accept any (type of) comment string. Every line appears to be a string entry to Arma, with obvious consequences when converting from a properly documented (commented) ofp csv
== Comments ==
 
* Arma: Arma doesn't appear to accept any (type of) comment string. Every line appears to be a string entry to Arma, with obvious consequences when converting from a properly documented (commented) {{ofp}} csv


Any syntax the engine cannot understand is interpreted as a comment.
Any syntax the engine cannot understand is interpreted as a comment.
Line 126: Line 154:




*Arma 2: To insert a string refering to a stringtable.csv or stringtable.xml, don't use the "" in the editor.  
{{arma2}}: To insert a string refering to a stringtable.csv or stringtable.xml, don't use the "" in the editor.
For example: you have the STR_myString.  
For example: you have {{hl|STR_myString}}.
To add it in the description field of the selected unit, just add it like @STR_myString, the "" will be added, self-acting by the editor, in the mission.sqm.
To add it in the description field of the selected unit, just add it like {{hl|@STR_myString}}, the "" will be added, self-acting by the editor, in mission.sqm.
 


==The selected language==
== The selected language ==
flashpoint.cfg in the root directory of your operation flashpoint folder defines the language to be used for your installation:
 
Language="English";
{{hl|flashpoint.cfg}} in the root directory of your operation flashpoint folder defines the language to be used for your installation:
<syntaxhighlight lang="cpp">
Language="English";
</syntaxhighlight>


This can be changed to any language that has valid entries in the stringtable.csv's. For more information on this subject read [[Language Selection]].
This can be changed to any language that has valid entries in the stringtable.csv's. For more information on this subject read [[Language Selection]].


==Replacing original game texts==
 
It is possible to replace every message of the original game by editing the global stringtable.csv file (in \res\bin\stringtable.csv). (Some messages, like addon names some GUI texts, briefing chapters (Plan, Notes, Gear, Group), etc. ''cannot'' be changed via the stringtable.csv though).
== Replacing original game texts ==
 
It is possible to replace every message of the original game by editing the global stringtable.csv file (in \res\bin\stringtable.csv).
(Some messages, like addon names some GUI texts, briefing chapters (Plan, Notes, Gear, Group), etc. ''cannot'' be changed via the stringtable.csv though).


For example, you can create custom radio names for your squads.
For example, you can create custom radio names for your squads.
Line 143: Line 178:
Create your group and give them a normal radio name with the following command in the init line of the commander.
Create your group and give them a normal radio name with the following command in the init line of the commander.


this [[setGroupId]] ["Alpha", "GroupColor0"]
<sqf>this setGroupId ["Alpha", "GroupColor0"];</sqf>


Now, in your '''stringtable.csv''' add;
Now, add in your [[Stringtable.csv]]:


  STR_CFG_GRPNAMES_ALPHA, "Your group name",
  STR_CFG_GRPNAMES_ALPHA, "Your group name",
Line 152: Line 187:
Where ''Your group name'' is the custom name you'd like your squad radio messages to have, ''Your color name'' is color of the squad (GroupColor0 is Black, for more details see [[setGroupId]]).
Where ''Your group name'' is the custom name you'd like your squad radio messages to have, ''Your color name'' is color of the squad (GroupColor0 is Black, for more details see [[setGroupId]]).


==Different sounds under different languages==
 
== Different sounds under different languages ==
 
You can use ''stringtable.csv'' not only for texts but sounds and other [[Description.ext]] classes. See example:
You can use ''stringtable.csv'' not only for texts but sounds and other [[Description.ext]] classes. See example:


Line 167: Line 204:


[[Description.ext]] (CfgRadio class only)
[[Description.ext]] (CfgRadio class only)
class CfgRadio
<syntaxhighlight lang="cpp">
{
class CfgRadio
sounds[] = { };
{
sounds[] = {};
class R1
 
{
class R1
name = "Radio #01";
{
sound[] = {$STR_RadioMsg1, db+10, 1.0};
name = "Radio #01";
title = $STR_R1;
sound[] = { $STR_RadioMsg1, db + 10, 1.0 };
};
title = "$STR_R1";
class R2
};
{
class R2
name = "Radio #02";
{
sound[] = {$STR_RadioMsg2, db+10, 1.0};
name = "Radio #02";
title = $STR_R2;
sound[] = { $STR_RadioMsg2, db+10, 1.0 };
};
title = "$STR_R2";
};
};
};
</syntaxhighlight>


How it works? During loading, [[Description.ext]] exactly, all string values preceded with ''$'' (dollar) are changed on right entires from ''stringtable.csv''. So when a player run game under English language, he (or she) will have English texts and sounds. The same think with Polish and other specified languages.
How does it work? During loading, [[Description.ext]] exactly, all string values preceded with ''$'' (dollar) are changed on right entires from ''stringtable.csv''.
So when a player run game under English language, they will have English texts and sounds. The same think with Polish and other specified languages.


This solution you can use for [[Description.ext#Identities|CfgIdentities]] class to create personages with translated names or even native faces.
This solution you can use for [[Description.ext#Identities|CfgIdentities]] class to create personages with translated names or even native faces.


'''Notes:'''  
'''Notes:'''<br>
*There are instances where the radio name will revert to the default after a reload of the mission.
There are instances where the radio name will revert to the default after a reload of the mission.
class CfgSounds
<syntaxhighlight lang="cpp">
{
class CfgSounds
  sounds[]={ListOfClassNames....};
{
  class 07av1
sounds[] = { 07av1 /* etc */ };
  {
class 07av1
    name="";
{
    sound[]={"07av01.ogg", db, 1.0};
name = "";
    titles[] =
sound[] = {"07av01.ogg", db, 1.0};
    {
titles[] = { 0, $STRCAMP_07av01 };
      0, $STRCAMP_07av01
};
    };
 
  };
// (...)
  .....
 
  class AnotherClassName
class AnotherClassName
  {
{
    name="";
name = "";
    sound[]={"Another.ogg", db, 1.0};
sound[] = { "Another.ogg", db, 1.0 };
    titles[] =
titles[] =
    {
{
      {0, $STR_SomeCsvString}, // one piece of voice text
{ 0, $STR_SomeCsvString }, // one piece of voice text
      {{6,0.5}, $STR_AnotherCsvString}// then another
{ 6, $STR_AnotherCsvString } // then another
    };
};
  };
};
};
</syntaxhighlight>
 


[[Category:Operation Flashpoint: Editing]]
{{GameCategory|ofp|Editing}}
[[Category:ArmA: Editing]]
{{GameCategory|arma1|Editing}}
[[Category:BIS_File_Formats]]
[[Category:BIS_File_Formats]]
[[Category:ArmA: File Formats]]
{{GameCategory|arma1|File Formats}}

Revision as of 16:56, 25 February 2023

Purpose

Stringtables are used to make internationalization easier for the game. They are used in addons, missions, and scripts.

Any strings that are used in the game can be kept separate from the code, and can therefore easily be edited and expanded into different languages.

Instead of using message strings directly in the code you are using a variable. This variable will then contain the actual string, read from stringtable.csv, with the language that's being read depending on the game settings.


CSV Format

The Stringtable.csv file is an ASCII text file, and can be edited with any text editor. One could theoretically use a spreadsheet program (like Excel) to edit the file, but that would be serious overkill. 'DO NOT use a word processor (like MS-Word, or Write) to edit this file though, as it will corrupt it, unless you are very knowledgeable and careful.

CSV stands for Comma-Separated Values. Using e.g Microsoft Excel to edit this file may corrupt the file, as some language settings will use a semicolon ; instead of a comma Template:hl,.
  • Operation Flashpoint uses ANSI encoding, the codepage is defined by the font used.
    • Operation Flashpoint cannot accept UTF encoding. You need to convert back to ANSI (e.g remove the 3 byte UTF "BOM" (byte order mark) tag at beginning of file when converting back the the real game).
  • Armed Assault accepts ANSI, Unicode and UTF-8 encoding (Unicode will be converted to UTF-8 on load)
  • Arma 2 and Arma 3 both accept CSV but use Stringtable.xml in preference. For whatever reason, Bohemia Interactive have destroyed the default language. It is no longer possible to simply state
STR_ANYTHING,Some Name

and have all languages accept it. You will get a 'blank' if a specific language (e.g 'german') is not endlessly repeated as well.


Function

CSV files are used as string lookup tables.

Although the engine uses other files with the extension CSV, the file for missions, addons, and campaigns is 'stringtable.csv' and must be located in the primary folder of the mission/addon/campaign.

In point of fact, the naming convention inside a csv is such that the first three letters of any variable (more later) must begin with STR, and referenced in mission.sqm, description.ext or anywhere else as $STRsomething.

The characters STR tell the engine to look in 'stringtable.csv' as opposed to use the literal string value.


Format

Language Columns

The basic idea is that every language is assigned one column. (e.g. English has one column, French has another.) The order of the columns doesn't matter. (i.e. whether English comes first, or French, or Czech, is irrelevant). However, when game language doesn't match any of the languages listed in stringtable, the first column is selected by default. Therefore it is recommended to use English there.

The very first line of any csv must contain a statement like this:

LANGUAGE,  Polish, Hungarian, Turkish

With this line you define the order in which the language columns are arranged. You can have as many or as few as you like.

Below this line the CSV file contains one line for each string definition; starting with the string name, and followed by the translations for the different languages:

Language,  English,Turkish,French
STR_BROKEN,Broken, Bozuk,  Merde
STR_GOOD,  Good,   İyi,    
STR_BAD,   Bad,    Kotu,   Merde, Encore
STR_FIXED, Fixed,  Sabit,  "Merde, Encore"
STR_ONE,   One,    ,    Une

Blank Strings

Note some interesting and highly flexible aspects of the above syntax.

There is no French equivalent for STR_GOOD, nor is there a Turkish equivalent for STR_ONE. The engine will default to the 2nd column. It happens to be 'English', but need not be.

ArmA: In ArmA this is different. If your country column exists, it will use that string, even if it is blank and not default to the 2nd column. So do not include languages in the LANGUAGE row which you are not utilising yet.

Default Language Column

The second column (the first 'string') is the default. Because of that, it is important that all of the 2nd columns are filled.

The second column does not have to be English - it can be any language the author is most comfortable with, and for which he will be able to supply all the required definitions. In that case though, he will have to adjust the "LANGUAGE, ..." column definition at the top of the file.

ArmA: In ArmA, if your language column is missing, then it will default to the game distributor's language column, if it exists. So if you own the German version of the game and a German column exists in any column and your chosen language is not in any column, then German will be used, even if German is not in the 2nd column.

Commas and Quotes

To separate strings from one another, commas are used. String do not have to be enclosed with quotation marks. In the case that commas are needed in the string definition itself, then that string would have to be enclosed by quotes (e.g. "Merde, Encore" you would need quotes).

Leading/Trailing Spaces

When defining a string, the text used by the engine is from the first non space character after a comma, until the last non space character before the next comma (or end of line). This would be familiar to many programmers as the Trim() function.

Thus

,this is a text,
,      this is a text       ,

would both return "this is a text".

This feature is helpful if you want to keep columns aligned (tabbed), to keep better track of the columns.


Usage

Definition in stringtable.csv:

LANGUAGE,    English,          German
STR_MOVETO,  Move to the,      Gehen sie zum
STR_STATION, railroad station, Bahnhof
STR_AIRPORT, airport,          Flughafen

Scripts

Activations and conditions too.

Arma

_text = localize "STR_MOVETO" + " " + localize "STR_AIRPORT";

Operation Flashpoint

_text = $STR_MOVETO + " " + $STR_AIRPORT

description.ext

 "$STR_AIRPORT"

mission.sqm

Markers, texting effects, mission name, etc:

If adding string table entry through the mission editor, the proper syntax is automatically added to the mission.sqm. If you are converting a mission from OFP to ArmA, you may need re-add the string table to avoid the "scalar bool array string 0xe0ffffef" error.

Operation Flashpoint

@STR_AIRPORT

Arma

"@STR_AIRPORT"


Comments

  • Arma: Arma doesn't appear to accept any (type of) comment string. Every line appears to be a string entry to Arma, with obvious consequences when converting from a properly documented (commented) Operation Flashpoint csv

Any syntax the engine cannot understand is interpreted as a comment.

By convention the double-forward slash (//) at the beginning of the line is used:

LANGUAGE,     English,          German
// actions
STR_MOVETO,   Move to the,      Gehen sie zum
STR_DESTROY,  Destroy the,      Zerstören sie den
// locations
STR_STATION,  railroad station, Bahnhof
STR_AIRPORT,  airport,          Flughafen

However, in practice anything that doesn't start with STR can only be a comment.


Arma 2: To insert a string refering to a stringtable.csv or stringtable.xml, don't use the "" in the editor. For example: you have STR_myString. To add it in the description field of the selected unit, just add it like @STR_myString, the "" will be added, self-acting by the editor, in mission.sqm.


The selected language

flashpoint.cfg in the root directory of your operation flashpoint folder defines the language to be used for your installation:

Language="English";

This can be changed to any language that has valid entries in the stringtable.csv's. For more information on this subject read Language Selection.


Replacing original game texts

It is possible to replace every message of the original game by editing the global stringtable.csv file (in \res\bin\stringtable.csv). (Some messages, like addon names some GUI texts, briefing chapters (Plan, Notes, Gear, Group), etc. cannot be changed via the stringtable.csv though).

For example, you can create custom radio names for your squads.

Create your group and give them a normal radio name with the following command in the init line of the commander.

this setGroupId ["Alpha", "GroupColor0"];

Now, add in your Stringtable.csv:

STR_CFG_GRPNAMES_ALPHA, "Your group name",
STR_CFG_GRPCOL_BLACK, "Your color name",

Where Your group name is the custom name you'd like your squad radio messages to have, Your color name is color of the squad (GroupColor0 is Black, for more details see setGroupId).


Different sounds under different languages

You can use stringtable.csv not only for texts but sounds and other Description.ext classes. See example:

stringtable.csv

LANGUAGE,"English","Polish"

STR_R1,"ENGLISH","POLSKI"
STR_R2,"US AND A SOLDIER HERE.","TUTAJ POLSKI ŻOŁNIERZ."

STR_RadioMsg1,"ENG\R1.WAV","POL\R1.WAV"
STR_RadioMsg2,"ENG\R2.WAV","POL\R2.WAV"

Of course all sounds we have in Sound directory. Moreover they are in two different folders: POL and ENG. It makes Sound more clean. You can use prefixes like: eng_ or pol_ insted.

Description.ext (CfgRadio class only)

class CfgRadio
{
	sounds[] = {};

	class R1
	{
		name = "Radio #01";
		sound[] = { $STR_RadioMsg1, db + 10, 1.0 };
		title = "$STR_R1";
	};
	class R2
	{
		name = "Radio #02";
		sound[] = { $STR_RadioMsg2, db+10, 1.0 };
		title = "$STR_R2";
	};
};

How does it work? During loading, Description.ext exactly, all string values preceded with $ (dollar) are changed on right entires from stringtable.csv. So when a player run game under English language, they will have English texts and sounds. The same think with Polish and other specified languages.

This solution you can use for CfgIdentities class to create personages with translated names or even native faces.

Notes:
There are instances where the radio name will revert to the default after a reload of the mission.

class CfgSounds
{
	sounds[] = { 07av1 /* etc */ };
	class 07av1
	{
		name = "";
		sound[] = {"07av01.ogg", db, 1.0};
		titles[] = { 0, $STRCAMP_07av01 };
	};

	// (...)

	class AnotherClassName
	{
		name = "";
		sound[] = { "Another.ogg", db, 1.0 };
		titles[] =
		{
			{ 0, $STR_SomeCsvString },		// one piece of voice text
			{ 6, $STR_AnotherCsvString }	// then another
		};
	};
};