|
|
|
|
|
If you have any general questions
about Ebsotech, please send e-mail
to info@ebsotech.com or
contact Ebsotech Research and Development
Center at the following address:
Ebsotech, Inc.
Rajakyläntie 28 A
01280 Vantaa
FINLAND
Tel: +358(0)442885299
|
|
|
|
|
|
|
|
Is
there an easier way to get string
resources?
|
| |
Yes, by following a simple convention
for defining a few macros to
access the resources. You need
to define the following (replace
the "MY" prefix with
your module prefix):
#define MYSTR_MYMSG TEXT("mymsg") /*
Application message strings.
*/
#define MYSTR_MYERR TEXT("myerr") /*
Error message strings. */
/* Returns a message string
from 'mymsg' resource. */
#define MYMSG(id) dxaStrCollectionGetStringPtr(MYSTR_MYMSG,
id)
/* Returns a message string
from 'myerr' resource. */
#define MYERR(id) dxaStrCollectionGetStringPtr(MYSTR_MYERR,
id)
With these macro definitions,
you can simply write:
_dtprintf (MYMSG (MYMSG_SOME_MESSAGE));
_dtprintf (MYMSG (MYMSG_FMT2_SOME_ERROR),
/* Print formatting string. */
iMyError, /*
Print error code. */
MYERR
(iMyError)); /*
Print error string. */
However, if you want to have
the macros to return the string
for the default language in situations
where the default language resource
file is not available or not
found in the search path, you
need to use more advanced macros
together with a special template
file for generating the default
strings as macros.
For more detailed examples, you
should examine the source code
of Language Resources Software
Accessory (LNGSA) and other Software
Accessories that use internationalization.
|
|
« Go
back |
|
|
|
|
|
|
|
| For
additional information on how to
purchase Ebsotech's products and
services, please contact sales@ebsotech.com |
|
|
|
|
|
|
|
|
| If
you have any questions or requests
regarding Ebsotech IX™ SDK,
please send e-mail to sdk@ebsotech.com |
|
|
|
|
|