MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IMdl_i18n_configuration Class Referenceabstract

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

#include <imdl_i18n_configuration.h>

Inheritance diagram for mi::neuraylib::IMdl_i18n_configuration:

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. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xb28d4381, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xb28d4381, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. 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 = 0;
// Set locale to French language
i18n_configuration->set_locale("fr");
// Query defined locale
locale = i18n_configuration->get_locale();
// Query system defined locale
locale = i18n_configuration->get_system_locale();
// Use system defined locale
// NOTE: The system locale used internally is truncated to two-letters to follow ISO 639-1
i18n_configuration->set_locale(i18n_configuration->get_system_keyword());
// Disable any translation
i18n_configuration->set_locale(0);
Handle class template for interfaces, automatizing the lifetime control via reference counting.
Definition: handle.h:113
This interface is used to query and change MDL internationalization settings.
Definition: imdl_i18n_configuration.h:52

Member Function Documentation

 get_locale()

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

Returns the locale used to translate annotations.

Returns

 get_system_keyword()

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.

 get_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.

 set_locale()

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, overwrite 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 SDK has been started.

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