MediaWiki fundraising/REL1_35
LanguageOs Class Reference

Ossetian (Ирон) More...

Inheritance diagram for LanguageOs:
Collaboration diagram for LanguageOs:

Public Member Functions

 convertGrammar ( $word, $case)
 Convert from the nominative form of a noun to other cases Invoked with {{grammar:case|word}}.
 
- Public Member Functions inherited from Language
 __construct ( $code=null, LocalisationCache $localisationCache=null, LanguageNameUtils $langNameUtils=null, LanguageFallback $langFallback=null, LanguageConverterFactory $converterFactory=null, HookContainer $hookContainer=null)
 
 __destruct ()
 Reduce memory usage PhanTypeSuspiciousNonTraversableForeach.
 
 __get (string $name)
 Use PHP's magic __get handler to handle lazy accessing to deprecated mConverter.
 
 alignEnd ()
 Return 'right' or 'left' as appropriate alignment for line-end for this language's text direction.
 
 alignStart ()
 Return 'left' or 'right' as appropriate alignment for line-start for this language's text direction.
 
 autoConvert ( $text, $variant=false)
 convert text to a variant
 
 autoConvertToAllVariants ( $text)
 convert text to all supported variants
 
 capitalizeAllNouns ()
 
 caseFold ( $s)
 Return a case-folded representation of $s.
 
 checkTitleEncoding ( $s)
 TODO: $s is not always a string per T218883.
 
 commafy ( $number)
 Adds commas to a given number.
 
 commaList (array $list)
 Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.
 
 convert ( $text)
 convert text to different variants of a language.
 
 convertCategoryKey ( $key)
 
 convertForSearchResult ( $termsArray)
 
 convertHtml ( $text)
 Perform output conversion on a string, and encode for safe HTML output.
 
 convertNamespace ( $ns, $variant=null)
 Convert a namespace index to a string in the preferred variant.
 
 convertPlural ( $count, $forms)
 Plural form transformations, needed for some languages.
 
 convertTitle ( $title)
 Convert a Title object to a string in the preferred variant.
 
 date ( $ts, $adj=false, $format=true, $timecorrection=false)
 
 dateFormat ( $usePrefs=true)
 This is meant to be used by time(), date(), and timeanddate() to get the date preference they're supposed to use, it should be used in all children.
 
 digitGroupingPattern ()
 
 digitTransformTable ()
 
 embedBidi ( $text='')
 Wraps argument with unicode control characters for directionality safety.
 
 emphasize ( $text)
 Italic is unsuitable for some languages.
 
 equals (Language $lang)
 Compare with an other language object.
 
 fallback8bitEncoding ()
 
 findVariantLink (&$link, &$nt, $ignoreOtherCond=false)
 If a language supports multiple variants, it is possible that non-existing link in one variant actually exists in another variant.
 
 firstChar ( $s)
 Get the first character of a string.
 
 formatBitrate ( $bps)
 Format a bitrate for output, using an appropriate unit (bps, kbps, Mbps, Gbps, Tbps, Pbps, Ebps, Zbps, Ybps, Rbps or Qbps) according to the magnitude in question.
 
 formatComputingNumbers ( $size, $boundary, $messageKey)
 
 formatDuration ( $seconds, array $chosenIntervals=[])
 Takes a number of seconds and turns it into a text using values such as hours and minutes.
 
 formatExpiry ( $expiry, $format=true, $infinity='infinity')
 Decode an expiry (block, protection, etc) which has come from the DB.
 
 formatNum ( $number, $nocommafy=false)
 Normally we output all numbers in plain en_US style, that is 293,291.235 for twohundredninetythreethousand-twohundredninetyone point twohundredthirtyfive.
 
 formatNumNoSeparators ( $number)
 Front-end for non-commafied formatNum.
 
 formatSize ( $size)
 Format a size in bytes for output, using an appropriate unit (B, KB, MB, GB, TB, PB, EB, ZB, YB, RB or QB) according to the magnitude in question.
 
 formatTimePeriod ( $seconds, $format=[])
 Formats a time given in seconds into a string representation of that time.
 
 gender ( $gender, $forms)
 Provides an alternative text depending on specified gender.
 
 getAllMessages ()
 
 getArrow ( $direction='forwards')
 An arrow, depending on the language direction.
 
 getBookstoreList ()
 Exports $wgBookstoreListEn.
 
 getCode ()
 Get the internal language code for this language object.
 
 getCompiledPluralRules ()
 Get the compiled plural rules for the language.
 
 getConverter ()
 Return the LanguageConverter used in the Language.
 
 getConvRuleTitle ()
 Get the conversion rule title, if any.
 
 getDateFormats ()
 
 getDateFormatString ( $type, $pref)
 Get a format string for a given type and preference.
 
 getDatePreferenceMigrationMap ()
 
 getDatePreferences ()
 
 getDefaultDateFormat ()
 
 getDefaultVariant ()
 
 getDir ()
 Return the correct HTML 'dir' attribute value for this language.
 
 getDirMark ( $opposite=false)
 A hidden direction mark (LRM or RLM), depending on the language direction.
 
 getDirMarkEntity ( $opposite=false)
 A hidden direction mark (LRM or RLM), depending on the language direction.
 
 getDurationIntervals ( $seconds, array $chosenIntervals=[])
 Takes a number of seconds and returns an array with a set of corresponding intervals.
 
 getExtraHashOptions ()
 returns language specific options used by User::getPageRenderHash() for example, the preferred language variant
 
 getExtraUserToggles ()
 
 getFallbackLanguages ()
 
 getFormattedNamespaces ()
 A convenience function that returns getNamespaces() with spaces instead of underscores in values.
 
 getFormattedNsText ( $index)
 A convenience function that returns the same thing as getNsText() except with '_' changed to ' ', useful for producing output.
 
 getGenderNsText ( $index, $gender)
 Returns gender-dependent namespace alias if available.
 
 getGrammarForms ()
 Get the grammar forms for the content language.
 
 getGrammarTransformations ()
 Get the grammar transformations data for the language.
 
 getHtmlCode ()
 Get the code in BCP 47 format which we can use inside of html lang="" tags.
 
 getHumanTimestamp (MWTimestamp $time, MWTimestamp $relativeTo=null, User $user=null)
 Get the timestamp in a human-friendly relative format, e.g., "3 days ago".
 
 getLocalNsIndex ( $text)
 Get a namespace key by value, case insensitive.
 
 getMagic ( $mw)
 Fill a MagicWord object with data from here.
 
 getMagicWords ()
 Get all magic words from cache.
 
 getMessage ( $key)
 
 getMessageFromDB ( $msg)
 Get a message from the MediaWiki namespace.
 
 getMonthAbbreviation ( $key)
 
 getMonthAbbreviationsArray ()
 
 getMonthName ( $key)
 
 getMonthNameGen ( $key)
 
 getMonthNamesArray ()
 
 getNamespaceAliases ()
 
 getNamespaceIds ()
 
 getNamespaces ()
 Returns an array of localised namespaces indexed by their numbers.
 
 getNsIndex ( $text)
 Get a namespace key by value, case insensitive.
 
 getNsText ( $index)
 Get a namespace value by key.
 
 getParentLanguage ()
 Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg.
 
 getPluralRuleIndexNumber ( $number)
 Find the index number of the plural rule appropriate for the given number.
 
 getPluralRules ()
 Get the plural rules for the language.
 
 getPluralRuleType ( $number)
 Find the plural rule type appropriate for the given number For example, if the language is set to Arabic, getPluralType(5) should return 'few'.
 
 getPluralRuleTypes ()
 Get the plural rule types for the language.
 
 getPreferredVariant ()
 
 getSpecialPageAliases ()
 Get special page names, as an associative array canonical name => array of valid names, including aliases.
 
 getURLVariant ()
 
 getVariantname ( $code, $usemsg=true)
 short names for language variants used for language conversion links.
 
 getVariants ()
 Get the list of variants supported by this language see sample implementation in LanguageZh.php.
 
 getWeekdayAbbreviation ( $key)
 
 getWeekdayName ( $key)
 
 hasVariant ( $variant)
 Strict check if the language has the specific variant.
 
 hasVariants ()
 Check if this is a language with variants.
 
 hasWordBreaks ()
 Most writing systems use whitespace to break up words.
 
 iconv ( $in, $out, $string)
 
 isRTL ()
 For right-to-left language support.
 
 lc ( $str, $first=false)
 
 lcfirst ( $str)
 
 linkPrefixCharset ()
 A regular expression character set to match legal word-prefixing characters which should be merged onto a link of the form foo[[bar]].
 
 linkPrefixExtension ()
 To allow "foo[[bar]]" to extend the link over the whole word "foobar".
 
 linkTrail ()
 A regular expression to match legal word-trailing characters which should be merged onto a link of the form [[foo]]bar.
 
 listToText (array $list)
 Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.
 
 minimumGroupingDigits ()
 
 needsGenderDistinction ()
 Whether this language uses gender-dependent namespace aliases.
 
 normalize ( $s)
 Convert a UTF-8 string to normal form C.
 
 normalizeForSearch ( $string)
 Some languages have special punctuation need to be normalized.
 
 parseFormattedNumber ( $number)
 
 pipeList (array $list)
 Same as commaList, but separate it with the pipe instead.
 
 resetNamespaces ()
 Resets all of the namespace caches.
 
 segmentByWord ( $string)
 Some languages such as Chinese require word segmentation, Specify such segmentation when overridden in derived class.
 
 segmentForDiff ( $text)
 languages like Chinese need to be segmented in order for the diff to be of any use
 
 semicolonList (array $list)
 Take a list of strings and build a locale-friendly semicolon-separated list, using the local semicolon-separator message.
 
 separatorTransformTable ()
 
 setNamespaces (array $namespaces)
 Arbitrarily set all of the namespace names at once.
 
 specialList ( $page, $details, $oppositedm=true)
 Make a list item, used by various special pages.
 
 sprintfDate ( $format, $ts, DateTimeZone $zone=null, &$ttl='unused')
 This is a workalike of PHP's date() function, but with better internationalisation, a reduced set of format characters, and a better escaping format.
 
 time ( $ts, $adj=false, $format=true, $timecorrection=false)
 
 timeanddate ( $ts, $adj=false, $format=true, $timecorrection=false)
 
 translateBlockExpiry ( $str, User $user=null, $now=0)
 
 truncateForDatabase ( $string, $length, $ellipsis='...', $adjustLength=true)
 Truncate a string to a specified length in bytes, appending an optional string (e.g.
 
 truncateForVisual ( $string, $length, $ellipsis='...', $adjustLength=true)
 Truncate a string to a specified number of characters, appending an optional string (e.g.
 
 truncateHtml ( $text, $length, $ellipsis='...')
 Truncate a string of valid HTML to a specified length in bytes, appending an optional string (e.g.
 
 uc ( $str, $first=false)
 
 ucfirst ( $str)
 
 ucwordbreaks ( $str)
 capitalize words at word breaks
 
 ucwords ( $str)
 
 unsegmentForDiff ( $text)
 and unsegment to show the result
 
 updateConversionTable (LinkTarget $linkTarget)
 Refresh the cache of conversion tables when MediaWiki:Conversiontable* is updated.
 
 userAdjust ( $ts, $tz=false)
 Used by date() and time() to adjust the time output.
 
 userDate ( $ts, User $user, array $options=[])
 Get the formatted date for the given timestamp and formatted for the given user.
 
 userTime ( $ts, User $user, array $options=[])
 Get the formatted time for the given timestamp and formatted for the given user.
 
 userTimeAndDate ( $ts, User $user, array $options=[])
 Get the formatted date and time for the given timestamp and formatted for the given user.
 
 viewPrevNext (Title $title, $offset, $limit, array $query=[], $atend=false)
 Generate (prev x| next x) (20|50|100...) type links for paging.
 

Additional Inherited Members

- Static Public Member Functions inherited from Language
static classFromCode ( $code, $fallback=true)
 
static clearCaches ()
 Intended for tests that may change configuration in a way that invalidates caches.
 
static factory ( $code)
 Get a cached or new language object for a given language code.
 
static fetchLanguageName ( $code, $inLanguage=LanguageNameUtils::AUTONYMS, $include=LanguageNameUtils::ALL)
 
static fetchLanguageNames ( $inLanguage=LanguageNameUtils::AUTONYMS, $include='mw')
 Get an array of language names, indexed by code.
 
static getCodeFromFileName ( $filename, $prefix='Language', $suffix='.php')
 Get the language code from a file name.
 
static getFallbackFor ( $code)
 Get the first fallback for a given language.
 
static getFallbacksFor ( $code, $mode=LanguageFallback::MESSAGES)
 Get the ordered list of fallback languages.
 
static getFallbacksIncludingSiteLanguage ( $code)
 Get the ordered list of fallback languages, ending with the fallback language chain for the site language.
 
static getFileName ( $prefix, $code, $suffix='.php')
 Get the name of a file for a certain language code.
 
static getJsonMessagesFileName ( $code)
 
static getLocalisationCache ()
 Get the LocalisationCache instance.
 
static getMessageFor ( $key, $code)
 Get a message for a given language.
 
static getMessageKeysFor ( $code)
 Get all message keys for a given language.
 
static getMessagesFileName ( $code)
 
static getMessagesFor ( $code)
 Get all messages for a given language WARNING: this may take a long time.
 
static hebrewNumeral ( $num)
 Hebrew Gematria number formatting up to 9999.
 
static isKnownLanguageTag ( $tag)
 Returns true if a language code is an IETF tag known to MediaWiki.
 
static isSupportedLanguage ( $code)
 Checks whether any localisation is available for that language tag in MediaWiki (MessagesXx.php exists).
 
static isValidBuiltInCode ( $code)
 Returns true if a language code is of a valid form for the purposes of internal customisation of MediaWiki, via Messages*.php or *.json.
 
static isValidCode ( $code)
 Returns true if a language code string is of a valid form, whether or not it exists.
 
static isWellFormedLanguageTag ( $code, $lenient=false)
 Returns true if a language code string is a well-formed language tag according to RFC 5646.
 
static romanNumeral ( $num)
 Roman number formatting up to 10000.
 
- Public Attributes inherited from Language
 $dateFormatStrings = []
 memoize
 
 $mCode
 
array[] $mExtendedSpecialPageAliases
 memoize
 
 $mMagicExtensions = []
 
 $transformData = []
 ReplacementArray object memoize.
 
const ALL = LanguageNameUtils::ALL
 Return all known languages in fetchLanguageName(s).
 
const AS_AUTONYMS = LanguageNameUtils::AUTONYMS
 Return autonyms in fetchLanguageName(s).
 
const HEBREW_CALENDAR_MONTH_GENITIVE_MESSAGES
 
const HEBREW_CALENDAR_MONTHS_MESSAGES
 
const HIJRI_CALENDAR_MONTH_MESSAGES
 
const IRANIAN_CALENDAR_MONTHS_MESSAGES
 
const MESSAGES_FALLBACKS = LanguageFallback::MESSAGES
 Return a fallback chain for messages in getFallbacksFor.
 
const MONTH_ABBREVIATED_MESSAGES
 
const MONTH_GENITIVE_MESSAGES
 
const MONTH_MESSAGES
 
const STRICT_FALLBACKS = LanguageFallback::STRICT
 Return a strict fallback chain in getFallbacksFor.
 
const SUPPORTED = LanguageNameUtils::SUPPORTED
 Return in fetchLanguageName(s) only the languages for which we have at least some localisation.
 
const WEEKDAY_ABBREVIATED_MESSAGES
 
const WEEKDAY_MESSAGES
 
- Static Public Attributes inherited from Language
static array $durationIntervals = self::DURATION_INTERVALS
 
static $mHebrewCalendarMonthGenMsgs = self::HEBREW_CALENDAR_MONTH_GENITIVE_MESSAGES
 
static $mHebrewCalendarMonthMsgs = self::HEBREW_CALENDAR_MONTHS_MESSAGES
 
static $mHijriCalendarMonthMsgs = self::HIJRI_CALENDAR_MONTH_MESSAGES
 
static $mIranianCalendarMonthMsgs = self::IRANIAN_CALENDAR_MONTHS_MESSAGES
 
static array $mLangObjCache = []
 
static $mMonthAbbrevMsgs = self::MONTH_ABBREVIATED_MESSAGES
 
static $mMonthGenMsgs = self::MONTH_GENITIVE_MESSAGES
 
static $mMonthMsgs = self::MONTH_MESSAGES
 
static $mWeekdayAbbrevMsgs = self::WEEKDAY_ABBREVIATED_MESSAGES
 
static $mWeekdayMsgs = self::WEEKDAY_MESSAGES
 
- Protected Member Functions inherited from Language
 getHookContainer ()
 Get a HookContainer, for hook metadata and running extension hooks.
 
 getHookRunner ()
 Get a HookRunner, for running core hooks.
 
 handleExplicitPluralForms ( $count, array $forms)
 Handles explicit plural forms for Language::convertPlural()
 
 mbUpperChar ( $char)
 Convert character to uppercase, allowing overrides of the default mb_upper behaviour, which is buggy in many ways.
 
 msg ( $msg)
 Get message object in this language.
 
 preConvertPlural ($forms, $count)
 Checks that convertPlural was given an array and pads it to requested amount of forms by copying the last one.
 
 removeBadCharFirst ( $string)
 Remove bytes that represent an incomplete Unicode character at the start of string (e.g.
 
 removeBadCharLast ( $string)
 Remove bytes that represent an incomplete Unicode character at the end of string (e.g.
 
 transformUsingPairFile ( $file, $string, $basePath=null)
 Transform a string using serialized data stored in the given file (which must be in the serialized subdirectory of $IP).
 
- Static Protected Member Functions inherited from Language
static convertDoubleWidth ( $string)
 convert double-width roman characters to single-width.
 
static insertSpace ( $string, $pattern)
 
- Protected Attributes inherited from Language
 $mNamespaceIds
 
 $namespaceAliases
 
array null $namespaceNames
 
const DURATION_INTERVALS
 

Detailed Description

Ossetian (Ирон)

Definition at line 30 of file LanguageOs.php.

Member Function Documentation

◆ convertGrammar()

LanguageOs::convertGrammar ( $word,
$case )

Convert from the nominative form of a noun to other cases Invoked with {{grammar:case|word}}.

Depending on word there are four different ways of converting to other cases. 1) Word consist of not Cyrillic letters or is an abbreviation. Then result word is: word + hyphen + case ending.

2) Word consist of Cyrillic letters. 2.1) Word is in plural. Then result word is: word - last letter + case ending. Ending of allative case here is 'æм'.

2.2) Word is in singular. 2.2.1) Word ends on consonant. Then result word is: word + case ending.

2.2.2) Word ends on vowel. Then result word is: word + 'й' + case ending for cases != allative or comitative and word + case ending for allative or comitative. Ending of allative case here is 'æ'.

Parameters
string$word
string$case
Returns
string

Reimplemented from Language.

Definition at line 56 of file LanguageOs.php.

References $wgGrammarForms.


The documentation for this class was generated from the following file: