obs-frontend-api: Add function to get frontend translated string

Developers now can easily get a translated string from the frontend
instead of using their own translations.
This commit is contained in:
cg2121
2022-03-09 04:24:33 -06:00
committed by Jim
parent b7ab8cf838
commit 65a360fa41
5 changed files with 20 additions and 0 deletions

View File

@@ -620,6 +620,11 @@ struct OBSStudioAPI : obs_frontend_callbacks {
return bstrdup(recordOutputPath);
}
const char *obs_frontend_get_locale_string(const char *string) override
{
return Str(string);
}
void on_load(obs_data_t *settings) override
{
for (size_t i = saveCallbacks.size(); i > 0; i--) {