+
Point of view
All features
deferred class DOMAIN_GET_TEXT [E_]
Summary
Direct parents
Inherit list: FILTER_GET_TEXT
Known children
Inherit list: DYNAMIC_DOMAIN_GET_TEXT
Overview
Features
{}
{ANY}
  • translation (message: STRING): E_
    Translation of message into current locale
    The translation is looked up in the default text domain.
{FILTER_GET_TEXT}
  • domain_translation (domain_name: STRING, message: STRING): E_
    Translation of message into current locale
    The translation is looked up in the text domain domain_name.
{ANY}
{ANY}
{}
{ANY}
{FILTER_GET_TEXT}
{}
{ANY}
  • text_domain: STRING
    The default text domain (namespace in which messages are looked up)
connect_to (filtered_: GET_TEXT[E_])
effective procedure
{}
require
  • filtered_ /= Void
ensure
translation (message: STRING): E_
effective function
{ANY}
Translation of message into current locale
The translation is looked up in the default text domain.
See also: set_message_locale
require
  • message.is_ascii
  • is_text_domain_set
  • is_message_locale_set
  • is_text_domain_set_up(text_domain)
ensure
  • Result.is_equal(domain_translation(text_domain, message))
domain_translation (domain_name: STRING, message: STRING): E_
effective function
Translation of message into current locale
The translation is looked up in the text domain domain_name.
See also: set_message_locale
require
  • message.is_ascii
  • is_message_locale_set
  • is_text_domain_set_up(domain_name)
is_text_domain_set: BOOLEAN
is True
constant attribute
{ANY}
Was a default text domain set?
ensure
  • Result implies not text_domain.is_empty
is_text_domain_set_up (domain_name: STRING): BOOLEAN
effective function
{ANY}
Is Current ready to translate messages from domain domain_name?
The precise way of setting up a domain varies between implementations but will typically involve loading a message catalog.
require
  • domain_name /= Void
text_domain_code_set (domain_name: STRING): STRING
effective function
{ANY}
The encoding of the Result of xxx_translation
require
  • domain_name /= Void
filtered: GET_TEXT[E_]
writable attribute
{}
ensure
  • Result /= Void
message_locale: STRING
effective function
{ANY}
The locale (roughly, the language) in which the program should output messages.
is_message_locale_set: BOOLEAN
effective function
{ANY}
ensure
  • Result = message_locale /= Void
register_domain (domain_name: STRING)
effective procedure
Used by a FILTER_GET_TEXT to let the filtered GET_TEXT know that it will use the text domain domain_name.
filter_domain_if_needed (filtered_: GET_TEXT[I_]): GET_TEXT[I_]
effective function
{}
Return filtered_ wrapped, if necessary, in a DYNAMIC_DOMAIN_GET_TEXT.
require
  • filtered_ /= Void
ensure
  • Result /= Void
  • Result.text_domain.is_equal(text_domain)
  • filtered_.text_domain.is_equal(text_domain) implies Result = filtered_
text_domain: STRING
deferred function
{ANY}
The default text domain (namespace in which messages are looked up)