libobs: Add functions to get locale text from modules

Useful for sharing translated text from modules with the frontend.  This
is technically already done via properties, but it would be nice to just
be able to explicitly look up locale text directly rather than have to
go through properties.
This commit is contained in:
jp9000
2020-08-08 10:01:17 -07:00
parent de2e89d972
commit d45017370b
4 changed files with 31 additions and 1 deletions

View File

@@ -423,6 +423,14 @@ EXPORT bool obs_init_module(obs_module_t *module);
/** Returns a module based upon its name, or NULL if not found */
EXPORT obs_module_t *obs_get_module(const char *name);
/** Returns locale text from a specific module */
EXPORT bool obs_module_get_locale_string(const obs_module_t *mod,
const char *lookup_string,
const char **translated_string);
EXPORT const char *obs_module_get_locale_text(const obs_module_t *mod,
const char *text);
/** Logs loaded modules */
EXPORT void obs_log_loaded_modules(void);