[Previous]
[Bookset]
[Next]

ApSetTranslation()

Change the current translation to another language

Synopsis:

#include <Ap.h>

int ApSetTranslation( char const *lang_ext );

Description:

ApSetTranslation() changes the current translation file to the one defined by lang_ext. If lang_ext is NULL, the translation is set to the default (i.e. the original language used in the application). If the extension pointed to by lang_ext is invalid, the translation file isn't changed.

When you run your application outside of PhAB, it looks for the translation files as follows:

  1. in the directories listed in the ABLPATH environment variable, if defined. This list takes the form:
    dir:dir:dir:dir
        

    Unlike the PATH environment variable, the current directory must be indicated by a period, not a space. A space indicates the directory where the executable is.

  2. in the same directory as the executable, if the ABLPATH environment variable isn't defined

Returns:

0
Successful completion.
-1
The translation extension is invalid.

Examples:

/* Set the current translation to German: */

ApSetTranslation( "de_DE");

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

[Previous]
[Bookset]
[Next]