OpenXcom
1.0
Open-source clone of the original X-Com
|
This class is the interface used to find plural forms for the different languages. More...
#include <LanguagePlurality.h>
Public Member Functions | |
virtual | ~LanguagePlurality () |
Allow proper destruction through base pointer. | |
virtual const char * | getSuffix (unsigned n) const =0 |
Get dictionary key suffix for value of n. More... | |
Static Public Member Functions | |
static LanguagePlurality * | create (const std::string &language) |
Create a concrete instance for a given language. More... | |
This class is the interface used to find plural forms for the different languages.
Derived classes implement getSuffix() according to the specific language's rules.
|
static |
Create a concrete instance for a given language.
Search and create a handler for the plurality rules of language.
language | Locale of the language. |
If the language was not found, a default with the same rules as English is returned.
language | The target language. |
|
pure virtual |
Get dictionary key suffix for value of n.
n | The number controlling the plurality. |
Implemented in OpenXcom::RomanianPlurality, OpenXcom::PolishPlurality, OpenXcom::CzechPlurality, OpenXcom::CyrillicPlurality, OpenXcom::NoSingular, OpenXcom::ZeroOneSingular, and OpenXcom::OneSingular.