/usr/include/mini18n.h is in libmini18n-dev 0.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | /* Copyright 2008 Guillaume Duhamel
This file is part of mini18n.
mini18n is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
mini18n is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with mini18n; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MINI18N_H
#define MINI18N_H
#ifdef __cplusplus
extern "C" {
#endif
/** @file */
#define MINI18N_UTF16 1
#define MINI18N_FORMAT_COUNT 1
#ifndef _
#define _(source) (mini18n(source))
#endif
#ifndef _16
#define _16(source) (mini18n_with_conversion(source, MINI18N_UTF16))
#endif
/**
* @brief Select a translation matching the operating system configuration.
*
* @param folder the folder to search for translations.
* @returns 0 on success, -1 otherwise
*/
int mini18n_set_domain(const char * folder);
/**
* @brief Load a translation from a file.
*
* @param filename of the translation to load.
* @returns 0 on success, -1 otherwise
*/
int mini18n_set_locale(const char * locale);
int mini18n_set_log(const char * filename);
/**
* @brief Translates a string.
*
* @param source string to translate
* @returns The translated string on success, the source string otherwise. The returned value should not be freed or modified in any way.
*/
const char * mini18n(const char * source);
/**
* @brief Translates and convert a string.
*
* The list of available conversion formats depends of the system.
* The converted value is stored so further calls to the function with the same source will return the same pointer.
*
* @param source String to translate.
* @param format The format to convert the string to.
*/
const void * mini18n_with_conversion(const char * source, unsigned int format);
void mini18n_close(void);
/**
*
* @mainpage
*
* Mini18n is a translation library.
*
* \section using Using
*
* \subsection using-selecting Selecting translation
*
* Mini18n supports either automaticaly choosing a translation based on the current system settings or
* load a given translation file.
*
* To let Mini18n select the translation file, call mini18n_set_domain() with the base directory
* of translation files.
*
* \section extending Extending
*
*/
#ifdef __cplusplus
}
#endif
#endif
|