Change the current translation to another language
#include <Ap.h> int ApSetTranslation( char const *lang_ext );
Ap
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:
dir:dir:dir:dir
Unlike the PATH environment variable, the current directory must be indicated by a period, not an empty string. An empty string in ABLPATH indicates the directory where the executable is.
In an application that loads PhAB DLLs, this function changes the current language for all registered contexts (i.e. the program and all DLLs). It first unloads any existing language translations for all the contexts, and then attempts to find a translation file for each context, using the name and location of the executable or DLL to perform the ABLPATH search described above. |
/* Set the current translation to German: */ ApSetTranslation( "de_DE");
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
ApAppendTranslation(), ApOpenDBase(), ApOpenDBaseFile(), ApGetTextRes()
International Language Support chapter of the Photon Programmer's Guide