Line 23... |
Line 23... |
23 |
*/
|
23 |
*/
|
24 |
|
24 |
|
25 |
#ifndef SVARLANG_H
|
25 |
#ifndef SVARLANG_H
|
26 |
#define SVARLANG_H
|
26 |
#define SVARLANG_H
|
27 |
|
27 |
|
28 |
/* loads translations for program PROGNAME, language LANG, in the path NLSPATH.
|
28 |
/* loads translations for program progname, language lang, in paths.
|
- |
|
29 |
*
|
- |
|
30 |
* only the two first letters of the lang strings are meaningful and they are
|
- |
|
31 |
* case insensitive.
|
- |
|
32 |
*
|
- |
|
33 |
* paths can be either a directory path (like "C:\DATA") or a list of paths
|
- |
|
34 |
* separated by a semicolon (example: "C:\DATA;.\LANGS;."). It may also be
|
- |
|
35 |
* NULL, in which case only the current directory will be searched.
|
- |
|
36 |
*
|
- |
|
37 |
* a typical call would be this: svarlang_load("myprog", "PL", NULL);
|
- |
|
38 |
*
|
- |
|
39 |
* this function returns 0 on success, non-zero otherwise. It is still possible
|
- |
|
40 |
* to call svarlang_strid() after a load failure, the previously loaded
|
- |
|
41 |
* language will be used then, or the default language if no loading has been
|
29 |
* returns 0 on success. */
|
42 |
* done yet. */
|
30 |
int svarlang_load(const char *progname, const char *lang, const char *nlspath);
|
43 |
int svarlang_load(const char *progname, const char *lang, const char *paths);
|
31 |
|
44 |
|
32 |
/* same as svarlang_load(), but relies on getenv() to pull LANG and NLSPATH. */
|
45 |
/* same as svarlang_load(), but relies on getenv() to pull LANG and NLSPATH.
|
- |
|
46 |
* this call should be used only by "CORE" SvarDOS programs. */
|
33 |
int svarlang_autoload(const char *progname);
|
47 |
int svarlang_autoload(const char *progname);
|
34 |
|
48 |
|
35 |
/* Returns a pointer to the string "id". Does not require svalang_load() to be
|
49 |
/* Returns a pointer to the string "id". Does not require svalang_load() to be
|
36 |
* executed, but then it will only return the reference language strings.
|
50 |
* executed, but then it will only return the reference language strings.
|
37 |
* a string id is the concatenation of the CATS-style identifiers, for example
|
51 |
* a string id is the concatenation of the CATS-style identifiers, for example
|