ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
649 stars 75 forks source link

[TF2] [Feature Request] Add a way to localize strings for HUD message entities in custom maps #4371

Open Ashetf2 opened 2 years ago

Ashetf2 commented 2 years ago

The Scream Fortress update added strings for the new maps that allows messages to be localized. This is good for people who don´t speak english, but it is limited to maps that will be added to the official map pool, thus excluding community maps. I suggest to add a .txt file named "(NAME_OF_MAP)_level_strings", similar to "soundscape_embed.txt" or "embed_level_sounds.txt" that allows to create custom strings. For example:

My custom map: ctf_upward Name of the file: "ctf_upward_level_strings.txt"

"#ctf_upward_enemy_bomb_near_final"
{
    "#default"          "THE ENEMY CART IS NEAR TO OUR FINAL POINT" //ENGLISH OR DEFAULT, NO OTHER LANGUAGE DETECTED
        "es"            "LA BOMBA DEL ENEMIGO ESTÁ CERCA A NUESTRO PUNTO FINAL" //SPANISH
}
Ashetf2 commented 2 years ago

Update: I think this may be solved if VScript is finally implemented into the game if the code has a way to detect the language of the user, or something similar to Template:Lang in the TF Wiki: https://wiki.teamfortress.com/wiki/Template:Lang