28 if ( !isset( $grammarForms[
'sh'] ) ) {
32 if ( isset( $grammarForms[
'sh'][$case][$word] ) ) {
33 return $grammarForms[
'sh'][$case][$word];
36 # if the word is not supported (i.e. there's no entry for any case),
37 # use a descriptive declension for it
38 $isWordSupported =
false;
39 foreach ( $grammarForms[
'sh'] as $caseForms ) {
40 if ( isset( $caseForms[$word] ) ) {
41 $isWordSupported =
true;
46 # descriptive declension for unknown projects
47 if ( !$isWordSupported && isset( $grammarForms[
'sh'][$case][
'projekt'] ) ) {
48 return $grammarForms[
'sh'][$case][
'projekt'] .
' ' . $word;
51 # this will return the original value for 'nominativ' (nominative)
57class_alias( LanguageSh::class,
'LanguageSh' );
A class containing constants representing the names of configuration variables.
const GrammarForms
Name constant for the GrammarForms setting, for use with Config::get()