LanguageGa.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * Irish (Gaeilge) specific code.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. * http://www.gnu.org/copyleft/gpl.html
  19. *
  20. * @file
  21. * @ingroup Language
  22. */
  23. /**
  24. * Irish (Gaeilge)
  25. *
  26. * @ingroup Language
  27. */
  28. class LanguageGa extends Language {
  29. /**
  30. * Convert day names
  31. * Invoked with {{GRAMMAR:transformation|word}}
  32. *
  33. * @param string $word
  34. * @param string $case
  35. * @return string
  36. */
  37. function convertGrammar( $word, $case ) {
  38. global $wgGrammarForms;
  39. if ( isset( $wgGrammarForms['ga'][$case][$word] ) ) {
  40. return $wgGrammarForms['ga'][$case][$word];
  41. }
  42. switch ( $case ) {
  43. case 'ainmlae':
  44. switch ( $word ) {
  45. case 'an Domhnach':
  46. $word = 'Dé Domhnaigh';
  47. break;
  48. case 'an Luan':
  49. $word = 'Dé Luain';
  50. break;
  51. case 'an Mháirt':
  52. $word = 'Dé Mháirt';
  53. break;
  54. case 'an Chéadaoin':
  55. $word = 'Dé Chéadaoin';
  56. break;
  57. case 'an Déardaoin':
  58. $word = 'Déardaoin';
  59. break;
  60. case 'an Aoine':
  61. $word = 'Dé hAoine';
  62. break;
  63. case 'an Satharn':
  64. $word = 'Dé Sathairn';
  65. break;
  66. }
  67. }
  68. return $word;
  69. }
  70. }