Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IMdl_i18n_configuration Class Referenceabstract

This interface is used to query and change MDL internationalization settings. More...

Inheritance diagram for mi::neuraylib::IMdl_i18n_configuration:
mi::base::Interface_declare< 0xb28d4381, 0x5760, 0x4c1a, 0xbe, 0xa1, 0x3f, 0xa7, 0x96, 0x8a, 0x86, 0x28 > mi::base::IInterface

Public Member Functions

MDL Locale
virtual Sint32 set_locale (const char *locale)=0
 Specifies which locale to use to translate annotations. More...
 
virtual const char * get_locale () const =0
 Returns the locale used to translate annotations. More...
 
virtual const char * get_system_locale () const =0
 Returns the system locale. More...
 
virtual const char * get_system_keyword () const =0
 Returns the reserved string which can be used to fallback to system locale. See mi::neuraylib::IMdl_i18n_configuration::set_locale() for usage. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xb28d4381, 0x5760, 0x4c1a, 0xbe, 0xa1, 0x3f, 0xa7, 0x96, 0x8a, 0x86, 0x28 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xb28d4381, 0x5760, 0x4c1a, 0xbe, 0xa1, 0x3f, 0xa7, 0x96, 0x8a, 0x86, 0x28 >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

This interface is used to query and change MDL internationalization settings.

Here is a sample pseudo-code to illustrate the usage of this component:

// Get the internationalization configuration component
Handle<IMdl_i18n_configuration> i18n_configuration(
neuray->get_api_component<IMdl_i18n_configuration>());
const char * locale = NULL;
// Set locale to French language
i18n_configuration->set_locale("fr");
// Query defined locale
locale = i18n_configuration->get_locale();
// Query sytem defined locale
locale = i18n_configuration->get_system_locale();
// Use sytem defined locale
i18n_configuration->set_locale(i18n_configuration->get_system_keyword());
// Disable any translation
i18n_configuration->set_locale(NULL);

Member Function Documentation

virtual const char* mi::neuraylib::IMdl_i18n_configuration::get_locale ( ) const
pure virtual

Returns the locale used to translate annotations.

Returns
virtual const char* mi::neuraylib::IMdl_i18n_configuration::get_system_keyword ( ) const
pure virtual

Returns the reserved string which can be used to fallback to system locale. See mi::neuraylib::IMdl_i18n_configuration::set_locale() for usage.

Returns
The reserved string which is used to fallback to system locale.
virtual const char* mi::neuraylib::IMdl_i18n_configuration::get_system_locale ( ) const
pure virtual

Returns the system locale.

Returns
The name of the locale set by the system or NULL if locale is not set.
virtual Sint32 mi::neuraylib::IMdl_i18n_configuration::set_locale ( const char *  locale)
pure virtual

Specifies which locale to use to translate annotations.

This interface can be used to set the locale to use for translation, overwite the system locale or disable any translation. By default, the locale defined by the system is used.

This function can only be called before the MDL API has been started.

Parameters
localeThe locale to be used. Values:
Returns
  • 0: Success.
  • -1: Failure. This function can only be called before the MDL API has been started.
Note
The locale "C" is ignored and will disable any translation. By default the system locale is used.