Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Boost.Locale: Message Formatting (translation)

Boost , ,

Message Formatting (translation)

Modules

 I/O Stream manipulators
 

Namespaces

 boost::locale::gnu_gettext
 This namespace holds classes that provide GNU Gettext message catalogs support.
 
 boost::locale::as
 This namespace includes all manipulators that can be used on IO streams.
 

Classes

class  boost::locale::message_format< CharType >
 This facet provides message formatting abilities. More...
 
class  boost::locale::basic_message< CharType >
 This class represents a message that can be converted to a specific locale message. More...
 

Typedefs

typedef CharType boost::locale::message_format< CharType >::char_type
 
typedef std::basic_string
< CharType > 
boost::locale::message_format< CharType >::string_type
 
typedef CharType boost::locale::basic_message< CharType >::char_type
 The character this message object is used with.
 
typedef std::basic_string
< char_type > 
boost::locale::basic_message< CharType >::string_type
 The string type this object can be used with.
 
typedef message_format< char_type > boost::locale::basic_message< CharType >::facet_type
 The type of the facet the messages are fetched with.
 
typedef basic_message< char > boost::locale::message
 
typedef basic_message< wchar_t > boost::locale::wmessage
 
typedef basic_message< char16_t > boost::locale::u16message
 
typedef basic_message< char32_t > boost::locale::u32message
 

Functions

 boost::locale::message_format< CharType >::message_format (size_t refs=0)
 
virtual char_type const * boost::locale::message_format< CharType >::get (int domain_id, char_type const *context, char_type const *id) const =0
 
virtual char_type const * boost::locale::message_format< CharType >::get (int domain_id, char_type const *context, char_type const *single_id, int n) const =0
 
virtual int boost::locale::message_format< CharType >::domain (std::string const &domain) const =0
 
virtual char_type const * boost::locale::message_format< CharType >::convert (char_type const *msg, string_type &buffer) const =0
 
 boost::locale::basic_message< CharType >::basic_message ()
 
 boost::locale::basic_message< CharType >::basic_message (char_type const *id)
 
 boost::locale::basic_message< CharType >::basic_message (char_type const *single, char_type const *plural, int n)
 
 boost::locale::basic_message< CharType >::basic_message (char_type const *context, char_type const *id)
 
 boost::locale::basic_message< CharType >::basic_message (char_type const *context, char_type const *single, char_type const *plural, int n)
 
 boost::locale::basic_message< CharType >::basic_message (string_type const &id)
 
 boost::locale::basic_message< CharType >::basic_message (string_type const &single, string_type const &plural, int number)
 
 boost::locale::basic_message< CharType >::basic_message (string_type const &context, string_type const &id)
 
 boost::locale::basic_message< CharType >::basic_message (string_type const &context, string_type const &single, string_type const &plural, int number)
 
 boost::locale::basic_message< CharType >::basic_message (basic_message const &other)
 
basic_message const & boost::locale::basic_message< CharType >::operator= (basic_message const &other)
 
void boost::locale::basic_message< CharType >::swap (basic_message &other)
 
 boost::locale::basic_message< CharType >::operator string_type () const
 
string_type boost::locale::basic_message< CharType >::str () const
 
string_type boost::locale::basic_message< CharType >::str (std::locale const &locale) const
 
string_type boost::locale::basic_message< CharType >::str (std::locale const &locale, std::string const &domain_id) const
 
string_type boost::locale::basic_message< CharType >::str (std::string const &domain_id) const
 
string_type boost::locale::basic_message< CharType >::str (std::locale const &loc, int id) const
 
void boost::locale::basic_message< CharType >::write (std::basic_ostream< char_type > &out) const
 
template<typename CharType >
std::basic_ostream< CharType > & boost::locale::operator<< (std::basic_ostream< CharType > &out, basic_message< CharType > const &msg)
 

Indirect message translation function family

template<typename CharType >
basic_message< CharType > boost::locale::translate (CharType const *msg)
 Translate a message, msg is not copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (CharType const *context, CharType const *msg)
 Translate a message in context, msg and context are not copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (CharType const *single, CharType const *plural, int n)
 Translate a plural message form, single and plural are not copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (CharType const *context, CharType const *single, CharType const *plural, int n)
 Translate a plural message from in constext, context, single and plural are not copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &msg)
 Translate a message, msg is copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &msg)
 Translate a message in context,context and msg is copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
 Translate a plural message form in constext, context, single and plural are copied.
 
template<typename CharType >
basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
 Translate a plural message form, single and plural are copied.
 

Direct message translation functions family

template<typename CharType >
std::basic_string< CharType > boost::locale::gettext (CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::ngettext (CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::dgettext (char const *domain, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::dngettext (char const *domain, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::pgettext (CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::npgettext (CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::dpgettext (char const *domain, CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > boost::locale::dnpgettext (char const *domain, CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 

Detailed Description

Этот модуль обеспечивает функциональность перевода сообщений, то есть позволяет вашему приложению говорить на родном языке

Typedef Documentation

template<typename CharType>
typedef CharType boost::locale::message_format< CharType >::char_type

Тип персонажа

typedef basic_message<char> boost::locale::message

Удобство Typedef для char

template<typename CharType>
typedef std::basic_string<CharType> boost::locale::message_format< CharType >::string_type

Струнный тип

typedef basic_message<char16_t> boost::locale::u16message

Удобство Typedef для char16_t

typedef basic_message<char32_t> boost::locale::u32message

Удобство Typedef для char32_t

typedef basic_message<wchar_t> boost::locale::wmessage

Удобство typedef для wchar_t

Function Documentation

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( )
inline

Создайте по умолчанию пустое сообщение

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( char_type const *  id)
inlineexplicit

Создайте простое сообщение из 0 завершённой строки. Строка должна существовать до тех пор, пока сообщение не будет уничтожено. Полезно для статических постоянных струн

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( char_type const *  single,
char_type const *  plural,
int  n 
)
inlineexplicit

Создайте простое сообщение множественного числа из 0 завершенных строк. Строки должны существовать до тех пор, пока сообщение не будет уничтожено. Полезно использовать статические постоянные струны.

n - число, single и plural - единичные и множественные формы сообщения

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( char_type const *  context,
char_type const *  id 
)
inlineexplicit

Создайте простое сообщение из 0 завершенных строк с контекстной информацией. Строка должна существовать до тех пор, пока сообщение не будет уничтожено. Полезно для статических постоянных струн

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( char_type const *  context,
char_type const *  single,
char_type const *  plural,
int  n 
)
inlineexplicit

Создайте простое сообщение множественного числа из 0 завершенных строк с контекстом. Строки должны существовать до тех пор, пока сообщение не будет уничтожено. Полезно использовать статические постоянные струны.

n - число, single и plural - единичные и множественные формы сообщения

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( string_type const &  id)
inlineexplicit

Создайте простое сообщение из строки.

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( string_type const &  single,
string_type const &  plural,
int  number 
)
inlineexplicit

Создайте простое сообщение множественного числа из строк.

n - число, single и plural - единичные и множественные формы сообщения

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( string_type const &  context,
string_type const &  id 
)
inlineexplicit

Создайте простое сообщение из строки с контекстом.

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( string_type const &  context,
string_type const &  single,
string_type const &  plural,
int  number 
)
inlineexplicit

Создайте простое сообщение множественного числа из строк.

n - число, single и plural - единичные и множественные формы сообщения

template<typename CharType>
boost::locale::basic_message< CharType >::basic_message ( basic_message< CharType > const &  other)
inline

Копировать объект

template<typename CharType>
virtual char_type const* boost::locale::message_format< CharType >::convert ( char_type const *  msg,
string_type buffer 
) конст
pure virtual

Преобразуйте строку msg в целевую кодировку локализации. Если msg уже находится в целевом кодировании, он будет возвращен, в противном случае преобразованная строка будет сохранена во временном буфере и будет возвращен buffer.c_str().

Примечание: для char_type, который является char16_t, char32_t и wchar_t это no-op, возвращается msg

template<typename CharType >
std::basic_string<CharType> boost::locale::dgettext ( char const *  domain,
CharType const *  id,
std::locale const &  loc = std::locale() 
)

Перевод сообщения id в соответствии с локализацией loc в домене domain

template<typename CharType >
std::basic_string<CharType> boost::locale::dngettext ( char const *  domain,
CharType const *  s,
CharType const *  p,
int  n,
std::locale const &  loc = std::locale() 
)

Переведите форму множественного числа в соответствии с локализацией loc в домене domain

template<typename CharType >
std::basic_string<CharType> boost::locale::dnpgettext ( char const *  domain,
CharType const *  context,
CharType const *  s,
CharType const *  p,
int  n,
std::locale const &  loc = std::locale() 
)

Переведите форму множественного числа в соответствии с локализацией loc в домене domain в контексте context

template<typename CharType>
virtual int boost::locale::message_format< CharType >::domain ( std::string const &  domain) конст
pure virtual

Преобразовать строку, определяющую домен , в целое число id, используемое функциями get

template<typename CharType >
std::basic_string<CharType> boost::locale::dpgettext ( char const *  domain,
CharType const *  context,
CharType const *  id,
std::locale const &  loc = std::locale() 
)

Перевод сообщения id в соответствии с локализацией loc в домене domain в контексте context

template<typename CharType>
virtual char_type const* boost::locale::message_format< CharType >::get ( int  domain_id,
char_type const *  context,
char_type const *  id 
) конст
pure virtual

Эта функция возвращает указатель в строку для сообщения, определенного контекстом и строкой идентификации id. Оба создают один ключ для поиска сообщений в домене, определенном domain_id.

Если контекст является NULL, он не считается частью ключа

Если найдена переведенная строка, она возвращается, в противном случае возвращается NULL

template<typename CharType>
virtual char_type const* boost::locale::message_format< CharType >::get ( int  domain_id,
char_type const *  context,
char_type const *  single_id,
int  n 
) конст
pure virtual

Эта функция возвращает указатель в строку для сообщения множественного числа, определенного context и строкой идентификации single_id.

Если контекст является NULL, он не считается частью ключа

Оба создают один ключ для поиска сообщений в домене, определенном domain_id. n используется для выбора правильной строки перевода для определенного числа.

Если найдена переведенная строка, она возвращается, в противном случае возвращается NULL

template<typename CharType >
std::basic_string<CharType> boost::locale::gettext ( CharType const *  id,
std::locale const &  loc = std::locale() 
)

Перевод сообщения id в соответствии с локализацией loc

template<typename CharType>
boost::locale::message_format< CharType >::message_format ( size_t  refs = 0)
inline

Разработчик Default

template<typename CharType >
std::basic_string<CharType> boost::locale::ngettext ( CharType const *  s,
CharType const *  p,
int  n,
std::locale const &  loc = std::locale() 
)

Переведите форму множественного числа в соответствии с локализацией loc

template<typename CharType >
std::basic_string<CharType> boost::locale::npgettext ( CharType const *  context,
CharType const *  s,
CharType const *  p,
int  n,
std::locale const &  loc = std::locale() 
)

Переведите форму множественного числа в соответствии с локализацией loc в контексте context

template<typename CharType>
boost::locale::basic_message< CharType >::operator string_type ( ) конст
inline

Класс сообщений может быть явно преобразован в класс строк

template<typename CharType >
std::basic_ostream<CharType>& boost::locale::operator<< ( std::basic_ostream< CharType > &  out,
basic_message< CharType > const &  msg 
)

Переведите сообщение msg и запишите его в поток

template<typename CharType>
basic_message const& boost::locale::basic_message< CharType >::operator= ( basic_message< CharType > const &  other)
inline

Назначить другое сообщение возражать против этого

template<typename CharType >
std::basic_string<CharType> boost::locale::pgettext ( CharType const *  context,
CharType const *  id,
std::locale const &  loc = std::locale() 
)

Перевод сообщения id в соответствии с локализацией loc в контексте context

template<typename CharType>
string_type boost::locale::basic_message< CharType >::str ( ) конст
inline

Перевод сообщения на строку в глобальной локализации по умолчанию с использованием домена по умолчанию

template<typename CharType>
string_type boost::locale::basic_message< CharType >::str ( std::locale const &  locale) конст
inline

Переведите сообщение в строку в локальном локальном , используя домен по умолчанию

template<typename CharType>
string_type boost::locale::basic_message< CharType >::str ( std::locale const &  locale,
std::string const &  domain_id 
) конст
inline

Переведите сообщение в строку, используя locale locale и домен сообщения domain_id

template<typename CharType>
string_type boost::locale::basic_message< CharType >::str ( std::string const &  domain_id) конст
inline

Переведите сообщение в строку, используя домен domain_id

template<typename CharType>
string_type boost::locale::basic_message< CharType >::str ( std::locale const &  loc,
int  id 
) конст
inline

Перевод сообщения в строку с использованием локального loc и индекса домена сообщения id

template<typename CharType>
void boost::locale::basic_message< CharType >::swap ( basic_message< CharType > &  other)
inline

Своп двух объектов сообщения

template<typename CharType>
void boost::locale::basic_message< CharType >::write ( std::basic_ostream< char_type > &  out) конст
inline

Переведите сообщение и напишите для потоковой передачи out, используя настроенные на поток локальные и доменные имена

Статья Boost.Locale: Message Formatting (translation) раздела может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 17:59:53/0.011534214019775/1