Back to index

webcit  8.12-dfsg
Defines | Functions | Variables
gettext.c File Reference
#include "webcit.h"
#include "webserver.h"

Go to the source code of this file.

Defines

#define SEARCH_LANG   20 /* how many langs should we parse? */

Functions

void ServerShutdownModule_GETTEXT (void)
void tmplput_offer_languages (StrBuf *Target, WCTemplputParams *TP)
void set_selected_language (const char *lang)
void go_selected_language (void)
void stop_selected_language (void)
void initialize_locales (void)
void TmplGettext (StrBuf *Target, WCTemplputParams *TP)
const char * get_selected_language (void)
void Header_HandleAcceptLanguage (StrBuf *Line, ParsedHttpHdrs *hdr)
void InitModule_GETTEXT (void)
void SessionNewModule_GETTEXT (wcsession *sess)
void SessionAttachModule_GETTEXT (wcsession *sess)
void SessionDestroyModule_GETTEXT (wcsession *sess)

Variables

const char * AvailLang []

Define Documentation

#define SEARCH_LANG   20 /* how many langs should we parse? */

Definition at line 15 of file gettext.c.


Function Documentation

const char* get_selected_language ( void  )

Definition at line 440 of file gettext.c.

                                        {
#ifdef ENABLE_NLS
#ifdef HAVE_USELOCALE
       return AvailLang[WC->selected_language];
#else
       return "en";
#endif
#else
       return "en";
#endif
}

Here is the caller graph for this function:

void go_selected_language ( void  )

Definition at line 417 of file gettext.c.

                                {
}

Here is the caller graph for this function:

void Header_HandleAcceptLanguage ( StrBuf *  Line,
ParsedHttpHdrs hdr 
)

Definition at line 453 of file gettext.c.

{
       hdr->HR.browser_language = Line;
}

Here is the caller graph for this function:

void initialize_locales ( void  )

Definition at line 424 of file gettext.c.

                              {
}

Here is the caller graph for this function:

void InitModule_GETTEXT ( void  )

Definition at line 461 of file gettext.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 402 of file gettext.c.

{
}

Here is the caller graph for this function:

Definition at line 489 of file gettext.c.

{
#ifdef ENABLE_NLS
       go_selected_language();                                 /* set locale */
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 498 of file gettext.c.

{
#ifdef ENABLE_NLS
       stop_selected_language();                        /* unset locale */
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 475 of file gettext.c.

{
#ifdef ENABLE_NLS
       if (   (sess != NULL)
              && (!sess->Hdr->HR.Static)
              && (sess->Hdr->HR.browser_language != NULL)
       ) {
              httplang_to_locale(sess->Hdr->HR.browser_language, sess);
       }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void set_selected_language ( const char *  lang)

Definition at line 413 of file gettext.c.

                                             {
}

Here is the caller graph for this function:

void stop_selected_language ( void  )

Definition at line 421 of file gettext.c.

                                  {
}

Here is the caller graph for this function:

void TmplGettext ( StrBuf *  Target,
WCTemplputParams TP 
)

Definition at line 430 of file gettext.c.

{
       StrBufAppendBufPlain(Target, _(TP->Tokens->Params[0]->Start), -1, 0);
}

Here is the caller graph for this function:

void tmplput_offer_languages ( StrBuf *  Target,
WCTemplputParams TP 
)

Definition at line 407 of file gettext.c.

{
       wc_printf("English (US)");
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char* AvailLang[]
Initial value:
 {
       "C",
       ""
}

Definition at line 394 of file gettext.c.