summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageSk.php
diff options
context:
space:
mode:
Diffstat (limited to 'languages/classes/LanguageSk.php')
-rw-r--r--languages/classes/LanguageSk.php94
1 files changed, 94 insertions, 0 deletions
diff --git a/languages/classes/LanguageSk.php b/languages/classes/LanguageSk.php
new file mode 100644
index 00000000..2fa8df0f
--- /dev/null
+++ b/languages/classes/LanguageSk.php
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Slovak (Slovenčina)
+ *
+ * @package MediaWiki
+ * @subpackage Language
+ */
+class LanguageSk extends Language {
+ # Convert from the nominative form of a noun to some other case
+ # Invoked with {{GRAMMAR:case|word}}
+ /**
+ * Cases: genitív, datív, akuzatív, lokál, inštrumentál
+ */
+ function convertGrammar( $word, $case ) {
+ global $wgGrammarForms;
+ if ( isset($wgGrammarForms['sk'][$case][$word]) ) {
+ return $wgGrammarForms['sk'][$case][$word];
+ }
+
+ switch ( $case ) {
+ case 'genitív':
+ if ( $word == 'Wikipédia' ) {
+ $word = 'Wikipédie';
+ } elseif ( $word == 'Wikislovník' ) {
+ $word = 'Wikislovníku';
+ } elseif ( $word == 'Wikicitáty' ) {
+ $word = 'Wikicitátov';
+ } elseif ( $word == 'Wikiknihy' ) {
+ $word = 'Wikikníh';
+ }
+ break;
+ case 'datív':
+ if ( $word == 'Wikipédia' ) {
+ $word = 'Wikipédii';
+ } elseif ( $word == 'Wikislovník' ) {
+ $word = 'Wikislovníku';
+ } elseif ( $word == 'Wikicitáty' ) {
+ $word = 'Wikicitátom';
+ } elseif ( $word == 'Wikiknihy' ) {
+ $word = 'Wikiknihám';
+ }
+ break;
+ case 'akuzatív':
+ if ( $word == 'Wikipédia' ) {
+ $word = 'Wikipédiu';
+ } elseif ( $word == 'Wikislovník' ) {
+ $word = 'Wikislovník';
+ } elseif ( $word == 'Wikicitáty' ) {
+ $word = 'Wikicitáty';
+ } elseif ( $word == 'Wikiknihy' ) {
+ $word = 'Wikiknihy';
+ }
+ break;
+ case 'lokál':
+ if ( $word == 'Wikipédia' ) {
+ $word = 'Wikipédii';
+ } elseif ( $word == 'Wikislovník' ) {
+ $word = 'Wikislovníku';
+ } elseif ( $word == 'Wikicitáty' ) {
+ $word = 'Wikicitátoch';
+ } elseif ( $word == 'Wikiknihy' ) {
+ $word = 'Wikiknihách';
+ }
+ break;
+ case 'inštrumentál':
+ if ( $word == 'Wikipédia' ) {
+ $word = 'Wikipédiou';
+ } elseif ( $word == 'Wikislovník' ) {
+ $word = 'Wikislovníkom';
+ } elseif ( $word == 'Wikicitáty' ) {
+ $word = 'Wikicitátmi';
+ } elseif ( $word == 'Wikiknihy' ) {
+ $word = 'Wikiknihami';
+ }
+ break;
+ }
+ return $word;
+ }
+
+ function convertPlural( $count, $w1, $w2, $w3) {
+ $count = str_replace ('.', '', $count);
+ $forms = array( $w1, $w2, $w3);
+ if ( $count == 1 ) {
+ $index = 0;
+ } elseif ( $count == 2 || $count == 3 || $count == 4 ) {
+ $index = 1;
+ } else {
+ $index = 2;
+ }
+ return $forms[$index];
+ }
+
+}
+?>