Go to the documentation of this file.
46 return strcmp(
a->code,
b->code);
71 return found->message;
141 while ((
next = strstr(
line,
"\\n")) != NULL) {
173 if (strncmp(
file->d_name,
"messages.", 9) != 0)
192 if (
line[0] !=
'#' &&
line[0] !=
'\0') {
198 token = strtok(NULL,
"|");
231 LOG(
llevError,
"i18n: couldn't find default language (en)\n");
sstring add_refcount(sstring str)
sstring add_string(const char *str)
struct i18n_message i18n_message
static void convert_newline(char *line)
BufferReader * bufferreader_init_from_file(BufferReader *br, const char *filepath, const char *failureMessage, LogLevel failureLevel)
static int i18n_message_compare_code(const i18n_message *a, const i18n_message *b)
int i18n_find_language_by_code(const char *code)
char * bufferreader_next_line(BufferReader *br)
void free_string(sstring str)
DIR * opendir(const char *)
void fatal(enum fatal_error err)
struct dirent * readdir(DIR *)
sstring i18n_get_language_code(int language)
const typedef char * sstring
int i18n_get_language_by_code(const char *code)
static struct i18n_file * i18n_files
void i18n_list_languages(object *who)
void LOG(LogLevel logLevel, const char *format,...)
void bufferreader_destroy(BufferReader *br)
struct i18n_message * messages
const char * i18n(const object *who, const char *code)
struct i18n_file i18n_file
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)