GRASS 8 Programmer's Manual 8.5.0RC1(2026)-3334b87d9c
Loading...
Searching...
No Matches
locale.c File Reference

GIS Library - Functions to handle locale. More...

#include <grass/config.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <grass/glocale.h>
#include <grass/gis.h>
Include dependency graph for locale.c:

Go to the source code of this file.

Macros

#define NO_NLS_UNUSED   G_UNUSED

Functions

void G_init_locale (void)
char * G_gettext (const char *package, const char *msgid)
 Gets localized text.
char * G_ngettext (const char *package, const char *msgids, const char *msgidp, unsigned long int n)
 Gets localized text with correct plural forms.

Detailed Description

GIS Library - Functions to handle locale.

(C) 2001-2014 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
GRASS Development Team
Date
2004-2008

Definition in file locale.c.

Macro Definition Documentation

◆ NO_NLS_UNUSED

#define NO_NLS_UNUSED   G_UNUSED

Definition at line 26 of file locale.c.

Referenced by G_gettext(), and G_ngettext().

Function Documentation

◆ G_gettext()

char * G_gettext ( const char * package,
const char * msgid )

Gets localized text.

Parameters
[in]package
[in]msgid
Return values
char* Pointer to string

Definition at line 65 of file locale.c.

References G_init_locale(), and NO_NLS_UNUSED.

◆ G_init_locale()

void G_init_locale ( void )

Definition at line 29 of file locale.c.

References G_initialize_done(), G_is_initialized(), and strcpy.

Referenced by G_gettext(), G_init_all(), and G_ngettext().

◆ G_ngettext()

char * G_ngettext ( const char * package,
const char * msgids,
const char * msgidp,
unsigned long int n )

Gets localized text with correct plural forms.

Parameters
[in]package
[in]msgidsA singular version of string
[in]msgidpA plural version of string
[in]nThe number
Return values
char* Pointer to string

Definition at line 85 of file locale.c.

References G_init_locale(), and NO_NLS_UNUSED.