3
#include <locale.h> /* setlocale */
4
#include <libintl.h> /* gettext,textdomain,... */
8
/* No need for memory allocations */
9
char *stmp=setlocale(LC_ALL,""); /* Setting up locale support */
10
puts(stmp); /* Current locale */
11
textdomain("hell"); /* .mo file name */
12
stmp=gettext("Helo World"); /* getting string from .mo */
16
char *stmp=setlocale(LC_ALL,"ru"); - For Russian by default
17
putenv("LANGUAGE=ru");
19
dgettext(DomainName,String) - Reads string from specified
20
domain ( ie .mo file )
21
dcgettext(DomainName,String,category) - Reads string from .mo file
23
/usr/share/locale/ru/<category>
24
(by default: LC_MESSAGES)
25
bindtextdomain(DomainName,Dir) - Find .mo file in specified
27
bind_text_domain_codeset(Domain,CodeSet) - Specifiying encoding in
28
which messages from domain
31
strcoll(str1,str2) - Comparing strings using
34
strxfrm(src,dest,n) - Converts string str in such
35
way, what 2 strings comparison
36
after conversion with strcmp
37
will return some result, as
38
their comparision with strcoll