added printlocalized CCMD to check strings in-game.

This commit is contained in:
Christoph Oelckers 2019-03-13 10:38:51 +01:00
parent 43ca814da8
commit 561444f921

View file

@ -42,6 +42,7 @@
#include "w_wad.h" #include "w_wad.h"
#include "v_text.h" #include "v_text.h"
#include "c_functions.h" #include "c_functions.h"
#include "gstrings.h"
//========================================================================== //==========================================================================
// //
@ -404,3 +405,22 @@ CCMD(listsnapshots)
} }
} }
CCMD(printlocalized)
{
if (argv.argc() > 1)
{
if (argv.argc() > 2)
{
FString lang = argv[2];
lang.ToLower();
if (lang.Len() >= 2)
{
Printf("%s\n", GStrings.GetLanguageString(argv[1], MAKE_ID(lang[0], lang[1], lang[2], 0)));
return;
}
}
Printf("%s\n", GStrings(argv[1]));
}
}