home *** CD-ROM | disk | FTP | other *** search
- gadutil.library/GU_OpenCatalog gadutil.library/GU_OpenCatalog
-
- NAME
- GU_OpenCatalog -- Open a message catalog.
-
- SYNOPSIS
- catalog = GU_OpenCatalog(name, version)
- D0 A0 D0
-
- struct Catalog *GU_OpenCatalog(STRPTR, ULONG);
-
- FUNCTION
- This function opens a message catalog. Catalogs contain all the
- text strings that an application uses. These strings can easily
- be replaced by strings in a different language, which causes the
- application to magically start operation in that new language.
-
- Catalogs originally come from disk files. This function searches
- for them in the following places:
-
- PROGDIR:Catalogs/languageName/name
- LOCALE:Catalogs/languageName/name
-
- where languageName is the name of the language associated with the
- locale parameter.
-
- INPUTS
- catalogname - the NULL terminated name of the catalog to open (just
- the name, not the complete path to it).
-
- version - required version of the catalog to open. Passign 0 as version
- number means that the program will accept any found version of
- the catalog. Other values than 0 means exactly that version.
-
- RESULT
- catalog - A message catalog to use with GU_GetLocaleStr or any of the
- Locale library functions or NULL. NULL is returned on error
- or if the application can use its built-in strings instead
- of loading a catalog from disk.
-
- EXAMPLE
- GU_OpenCatalog("myprogram.catalog",0);
-
- will open any version of the catalog file "myprogram.catalog" found
- in either PROGDIR:Catalogs/languageName/ (where the program was started
- from), or LOCALE:Catalogs/languageName/.
-
- GU_OpenCatalog("myprogram.catalog",5);
-
- will open version 5 of the catalog file. If v5 is not available, the
- program will use its internal strings.
-
- NOTES
- If you want to specify other tags than the version tag, you must
- use the Locale library OpenCatalog(). This function is generally a
- shortcut to that function. By using this routine, you may not need
- to open Locale library at all.
-
- This routine assumes that the built-in language of the program is
- english. If you write your programs in another language, you must
- open the catalog by yourself.
-
- SEE ALSO
- GU_CloseCatalog(), locale/OpenCatalog()
-