text.h

Go to the documentation of this file.
00001 #/*
00002     text.h:
00003 
00004     Copyright (C) 1999 John ffitch
00005     Jan 27 2005: Replaced with new implementation by Istvan Varga
00006     Dec 25 2007: Added gettext support by John ffitch
00007 
00008     This file is part of Csound.
00009 
00010     The Csound Library is free software; you can redistribute it
00011     and/or modify it under the terms of the GNU Lesser General Public
00012     License as published by the Free Software Foundation; either
00013     version 2.1 of the License, or (at your option) any later version.
00014 
00015     Csound is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU Lesser General Public License for more details.
00019 
00020     You should have received a copy of the GNU Lesser General Public
00021     License along with Csound; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00023     02111-1307 USA
00024 */
00025 
00026 #ifndef CSOUND_TEXT_H
00027 #define CSOUND_TEXT_H
00028 
00029 /* list of languages */
00030 
00031   typedef enum {
00032     CSLANGUAGE_DEFAULT = 0,
00033     CSLANGUAGE_AFRIKAANS,
00034     CSLANGUAGE_ALBANIAN,
00035     CSLANGUAGE_ARABIC,
00036     CSLANGUAGE_ARMENIAN,
00037     CSLANGUAGE_ASSAMESE,
00038     CSLANGUAGE_AZERI,
00039     CSLANGUAGE_BASQUE,
00040     CSLANGUAGE_BELARUSIAN,
00041     CSLANGUAGE_BENGALI,
00042     CSLANGUAGE_BULGARIAN,
00043     CSLANGUAGE_CATALAN,
00044     CSLANGUAGE_CHINESE,
00045     CSLANGUAGE_CROATIAN,
00046     CSLANGUAGE_CZECH,
00047     CSLANGUAGE_DANISH,
00048     CSLANGUAGE_DUTCH,
00049     CSLANGUAGE_ENGLISH_UK,
00050     CSLANGUAGE_ENGLISH_US,
00051     CSLANGUAGE_ESTONIAN,
00052     CSLANGUAGE_FAEROESE,
00053     CSLANGUAGE_FARSI,
00054     CSLANGUAGE_FINNISH,
00055     CSLANGUAGE_FRENCH,
00056     CSLANGUAGE_GEORGIAN,
00057     CSLANGUAGE_GERMAN,
00058     CSLANGUAGE_GREEK,
00059     CSLANGUAGE_GUJARATI,
00060     CSLANGUAGE_HEBREW,
00061     CSLANGUAGE_HINDI,
00062     CSLANGUAGE_HUNGARIAN,
00063     CSLANGUAGE_ICELANDIC,
00064     CSLANGUAGE_INDONESIAN,
00065     CSLANGUAGE_ITALIAN,
00066     CSLANGUAGE_JAPANESE,
00067     CSLANGUAGE_KANNADA,
00068     CSLANGUAGE_KASHMIRI,
00069     CSLANGUAGE_KAZAK,
00070     CSLANGUAGE_KONKANI,
00071     CSLANGUAGE_KOREAN,
00072     CSLANGUAGE_LATVIAN,
00073     CSLANGUAGE_LITHUANIAN,
00074     CSLANGUAGE_MACEDONIAN,
00075     CSLANGUAGE_MALAY,
00076     CSLANGUAGE_MALAYALAM,
00077     CSLANGUAGE_MANIPURI,
00078     CSLANGUAGE_MARATHI,
00079     CSLANGUAGE_NEPALI,
00080     CSLANGUAGE_NORWEGIAN,
00081     CSLANGUAGE_ORIYA,
00082     CSLANGUAGE_POLISH,
00083     CSLANGUAGE_PORTUGUESE,
00084     CSLANGUAGE_PUNJABI,
00085     CSLANGUAGE_ROMANIAN,
00086     CSLANGUAGE_RUSSIAN,
00087     CSLANGUAGE_SANSKRIT,
00088     CSLANGUAGE_SERBIAN,
00089     CSLANGUAGE_SINDHI,
00090     CSLANGUAGE_SLOVAK,
00091     CSLANGUAGE_SLOVENIAN,
00092     CSLANGUAGE_SPANISH,
00093     CSLANGUAGE_SWAHILI,
00094     CSLANGUAGE_SWEDISH,
00095     CSLANGUAGE_TAMIL,
00096     CSLANGUAGE_TATAR,
00097     CSLANGUAGE_TELUGU,
00098     CSLANGUAGE_THAI,
00099     CSLANGUAGE_TURKISH,
00100     CSLANGUAGE_UKRAINIAN,
00101     CSLANGUAGE_URDU,
00102     CSLANGUAGE_UZBEK,
00103     CSLANGUAGE_VIETNAMESE,
00104     CSLANGUAGE_COLUMBIAN
00105 } cslanguage_t;
00106 
00107 #ifdef GNU_GETTEXT
00108 #ifdef __cplusplus
00109 extern "C" {
00110 #endif
00111 #include <libintl.h>
00112   /* This could be gettext but this indirection helps debugging */
00113 #define Str(x) csoundLocalizeString(x)
00114 void init_getstring(void);
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118 
00119 #else
00120 #ifdef __cplusplus
00121 extern "C" {
00122 #endif
00123 
00124 #ifdef __BUILDING_LIBCSOUND
00125 
00126 /* Deal with localisation of mesages */
00127 
00128 #define Str(x)  csoundLocalizeString(x)
00129 
00130 /* NOTE: function prototypes are in csound.h */
00131 
00132 /*
00133  * Set language to 'lang_code' (lang_code can be for example
00134  * CSLANGUAGE_ENGLISH_UK or CSLANGUAGE_FRENCH or many others,
00135  * see n_getstr.h for the list of languages). This affects all
00136  * Csound instances running in the address space of the current
00137  * process. The special language code CSLANGUAGE_DEFAULT can be
00138  * used to disable translation of messages and free all memory
00139  * allocated by a previous call to csoundSetLanguage().
00140  * csoundSetLanguage() loads all files for the selected language
00141  * from the directory specified by the CSSTRNGS environment
00142  * variable.
00143  */
00144 
00145 void init_getstring(void);
00146 
00147 #endif  /* __BUILDING_LIBCSOUND */
00148 
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152 void init_getstring(void);
00153 
00154 #endif
00155 
00156 #endif  /* CSOUND_TEXT_H */
00157 

Generated on Sun Nov 9 00:04:52 2008 for Csound and CsoundAC by  doxygen 1.5.6