@CATALOG name$[, table]
@CATALOG
specifies a catalog that doesn't exist.
In that case, GetCatalogString() will simply fall
back to the default English strings without throwing an error.
Note that there currently can only be a single catalog per application. Thus,
@CATALOG
should only be used once per script. Also note that name$
must not
be a filename but the name of a catalog that is stored within a Hollywood catalog
directory structure. See OpenCatalog for details on how such a Hollywood catalog structure is organized.
The advantage of using @CATALOG
instead of OpenCatalog()
is that if you use @CATALOG
, the catalogs for all available languages will
be linked into your executable or applet when you compile your script. This
makes it easier to distribute your project because you don't have to include
the catalog directory structure with your application. Also, when compiling
Hollywood applets for mobile systems like Android or iOS, it's much better to
have all external files linked into the applet.
In addition to the name$
parameter, @CATALOG
also accepts an optional table
argument. The following fields in the table argument are currently available:
Link:
False
if you do not want to have this catalog
linked to your executable/applet when you compile your script.
This field defaults to True
which means that the catalog will be linked
to your executable/applet when Hollywood is in compile mode.
To load a catalog at runtime, use the OpenCatalog() function. See OpenCatalog for details.
@CATALOG "Hollywood.catalog" ; this is our default English catalog def$ = {} def$[0] = "Welcome to Hollywood!" def$[1] = "Written by Andreas Falkenhahn" def$[2] = "What do you wanna do?" ; if Hollywood.catalog is not available in the ; user's language; the English strings will be ; used For k = 0 To 2 c$[k] = GetCatalogString(k, def$[k]) NextThe code above opens "Hollywood.catalog" and prints the first three entries from that catalog.