diff options
author | Motonobu Takahashi <monyo@samba.org> | 2001-09-24 15:55:09 +0000 |
---|---|---|
committer | Motonobu Takahashi <monyo@samba.org> | 2001-09-24 15:55:09 +0000 |
commit | 96db4b1ba3a48f50b80b2cfbf0b940e073b7843c (patch) | |
tree | bd8d1c25af214250053a84b71b668e81bef7ef5d /source3/include/webintl.h | |
parent | 63dba7abe04c1d33bbfa5e921e4aa967dc3966c3 (diff) | |
download | samba-96db4b1ba3a48f50b80b2cfbf0b940e073b7843c.tar.gz samba-96db4b1ba3a48f50b80b2cfbf0b940e073b7843c.tar.bz2 samba-96db4b1ba3a48f50b80b2cfbf0b940e073b7843c.zip |
Added SWAT i18n feature:
TO enable configure with --with-i18n-swat
to support this gettext is integrated
and a new directories name "po" and "intl" are created.
now these languages are supported:
en - English (default)
ja - Japanese
po - Polish
tr - Turkish
To add your language,
to create ${your_language}.po by translating source/po/en.po
into your language is needed.
some of html and image files of various language version are not
included yet, though message catalogue files are installed.
you need to copy files manually under
${swatdir}/lang/$ln/{help,images,included,using_samba}
And also added a option to intall manual pages:
of various lang version
To enable configure with --with-manlangs
but manual pages themself are not included yet.
(This used to be commit 486b79a6fc4ba20a751aab544bd0f7ccff2b3d19)
Diffstat (limited to 'source3/include/webintl.h')
-rw-r--r-- | source3/include/webintl.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/source3/include/webintl.h b/source3/include/webintl.h new file mode 100644 index 0000000000..12626a5f19 --- /dev/null +++ b/source3/include/webintl.h @@ -0,0 +1,52 @@ +#ifndef I18N_H_INCLUDED +#define I18N_H_INCLUDED 1 + +/* + * I18N_ORIGINAL_LANG ...the language of the original document files (*.html). + */ +#define I18N_ORIGINAL_LANG "en" + +/* these constants are defined in Makefile. + * + * I18N_PACKAGE ...package name "i18n_swat" defined in configure.in. + * I18N_LOCALEDIR ...directory to put message catalogs. + * I18N_LOCALE_FILE ...filename of the language-locale map file. + */ + +#ifdef ENABLE_NLS +#define I18N_GETTEXT 1 +#endif /* ENABLE_NLS */ + +/* if NLS is disabled (ENABLE_NLS == 0), configure script will + * automatically creates intl/libintl.h -> intl/libgettext.h (symlink) + * and gettext(str) is defined as (str) in that file. + */ +#include <libintl.h> +#define _(String) gettext(String) +#define N_(String) (String) + +#if I18N_SWAT +#define LN_(fname) ln_get_pref_file_n_o(fname) +#else +#define LN_(fname) (fname) +#endif /* I18N_SWAT */ + +/* global function pointers defined in kanji.c. */ +extern char *(*dos_to_dos)(char *to, const char *from); + +/* ****************************************************************** + * macros for debugging. + ***************************************************************** */ +#define LN_R_NODEBUG 1 +#ifdef LN_R_NODEBUG +#define rassert(b) (void)0 +#define rstrace(s) (void)0 + +#else +void ln_debug_error(const char *info, int nLine); +void rassert_help(BOOL b, int l); +#define rassert(b) rassert_help((BOOL)(b), (__LINE__)) +#define rstrace(s) ln_debug_error((s), (__LINE__)) +#endif /* LN_R_NODEBUG */ + +#endif /* I18N_H_INCLUDED */ |