Add API for setting/getting current locale

This API is used to set the current locale for libobs, which it will set
for all modules when a module is loaded or specifically when the locale
is manually changed.
This commit is contained in:
jp9000
2014-06-25 00:21:16 -07:00
parent 9f652e6416
commit 899f053034
6 changed files with 42 additions and 8 deletions

View File

@@ -197,8 +197,12 @@ struct source_frame {
/* ------------------------------------------------------------------------- */
/* OBS context */
/** Initializes OBS */
EXPORT bool obs_startup(void);
/**
* Initializes OBS
*
* @param locale The locale to use for modules
*/
EXPORT bool obs_startup(const char *locale);
/** Releases all data associated with OBS and terminates the OBS context */
EXPORT void obs_shutdown(void);
@@ -206,6 +210,17 @@ EXPORT void obs_shutdown(void);
/** @return true if the main OBS context has been initialized */
EXPORT bool obs_initialized(void);
/**
* Sets a new locale to use for modules. This will call obs_module_set_locale
* for each module with the new locale.
*
* @param locale The locale to use for modules
*/
EXPORT void obs_set_locale(const char *locale);
/** @return the current locale */
EXPORT const char *obs_get_locale(void);
/**
* Sets base video ouput base resolution/fps/format
*