"Fossies" - the Fresh Open Source Software Archive

Member "sitecopy-0.16.6/lib/neon/ne_i18n.c" (29 Aug 2005, 1537 Bytes) of archive /linux/www/sitecopy-0.16.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ne_i18n.c" see the Fossies "Dox" file reference documentation.

    1 /* 
    2    Internationalization of neon
    3    Copyright (C) 1999-2005, Joe Orton <joe@manyfish.co.uk>
    4 
    5    This library is free software; you can redistribute it and/or
    6    modify it under the terms of the GNU Library General Public
    7    License as published by the Free Software Foundation; either
    8    version 2 of the License, or (at your option) any later version.
    9    
   10    This library is distributed in the hope that it will be useful,
   11    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13    Library General Public License for more details.
   14 
   15    You should have received a copy of the GNU Library General Public
   16    License along with this library; if not, write to the Free
   17    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
   18    MA 02111-1307, USA
   19 
   20 */
   21 
   22 #include "config.h"
   23 
   24 #include "ne_i18n.h"
   25 
   26 #ifdef HAVE_LIBINTL_H
   27 #include <libintl.h>
   28 #endif
   29 
   30 void ne_i18n_init(const char *encoding)
   31 {
   32 #if defined(NE_HAVE_I18N) && defined(NEON_IS_LIBRARY)
   33     /* The bindtextdomain call is only enabled if neon is built as a
   34      * library rather than as a bundled source; it would be possible
   35      * in the future to allow it for bundled builds too, if the neon
   36      * message catalogs could be installed alongside the app's own
   37      * message catalogs. */
   38     bindtextdomain("neon", LOCALEDIR);
   39 
   40 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   41     if (encoding) {
   42         bind_textdomain_codeset("neon", encoding);
   43     }
   44 #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
   45 
   46 #endif
   47 }