Audacity 3.2.0
Classes | Macros | Functions
Internat.h File Reference
#include <vector>
#include <wx/longlong.h>
#include "TranslatableString.h"
Include dependency graph for Internat.h:

Go to the source code of this file.

Classes

class  Internat
 Internationalisation support. More...
 

Macros

#define _TS(s)   GetCustomSubstitution( s )
 
#define XO(s)   (TranslatableString{ wxT(s), {} })
 
#define XC(s, c)   (TranslatableString{ wxT(s), {} }.Context(c))
 
#define XXO(s)   XO(s)
 
#define XXC(s, c)   XC(s, c)
 
#define _(s)   GetCustomTranslation((s))
 
#define XP(sing, plur, n)    TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )
 
#define XPC(sing, plur, n, c)    TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )
 
#define UTF8CTOWX(X)   wxString((X), wxConvUTF8)
 
#define LAT1CTOWX(X)   wxString((X), wxConvISO8859_1)
 
#define HAS_I18N_CONTEXTS   wxCHECK_VERSION(3, 1, 1)
 

Functions

STRINGS_API const wxString & GetCustomTranslation (const wxString &str1)
 
STRINGS_API const wxString & GetCustomSubstitution (const wxString &str1)
 

Macro Definition Documentation

◆ _

#define _ (   s)    GetCustomTranslation((s))

Definition at line 73 of file Internat.h.

◆ _TS

#define _TS (   s)    GetCustomSubstitution( s )

Definition at line 27 of file Internat.h.

◆ HAS_I18N_CONTEXTS

#define HAS_I18N_CONTEXTS   wxCHECK_VERSION(3, 1, 1)

Definition at line 163 of file Internat.h.

◆ LAT1CTOWX

#define LAT1CTOWX (   X)    wxString((X), wxConvISO8859_1)

Definition at line 158 of file Internat.h.

◆ UTF8CTOWX

#define UTF8CTOWX (   X)    wxString((X), wxConvUTF8)

Definition at line 157 of file Internat.h.

◆ XC

#define XC (   s,
 
)    (TranslatableString{ wxT(s), {} }.Context(c))

Definition at line 37 of file Internat.h.

◆ XO

#define XO (   s)    (TranslatableString{ wxT(s), {} })

Definition at line 31 of file Internat.h.

◆ XP

#define XP (   sing,
  plur,
 
)     TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )

Definition at line 94 of file Internat.h.

◆ XPC

#define XPC (   sing,
  plur,
  n,
 
)     TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )

Definition at line 98 of file Internat.h.

◆ XXC

#define XXC (   s,
 
)    XC(s, c)

Definition at line 47 of file Internat.h.

◆ XXO

#define XXO (   s)    XO(s)

Definition at line 44 of file Internat.h.

Function Documentation

◆ GetCustomSubstitution()

STRINGS_API const wxString & GetCustomSubstitution ( const wxString &  str1)

Definition at line 39 of file Internat.cpp.

40{
41 return str1 ;
42}

Referenced by GetCustomTranslation().

Here is the caller graph for this function:

◆ GetCustomTranslation()

STRINGS_API const wxString & GetCustomTranslation ( const wxString &  str1)

Definition at line 46 of file Internat.cpp.

47{
48 const wxString& str2 = wxGetTranslation( str1 );
49 return GetCustomSubstitution( str2 );
50}
STRINGS_API const wxString & GetCustomSubstitution(const wxString &str1)
Definition: Internat.cpp:39

References GetCustomSubstitution().

Referenced by gettext().

Here is the call graph for this function:
Here is the caller graph for this function: