X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=languages%2Fclasses%2FLanguageHy.php;h=05b0ebed04d240ecd4fff375975ca09a29d34bf7;hb=0ac1ee63e8b131576c8e9b703ed01ee5f9a377d1;hp=7cedcc523c58d892e1e997362b3205454e64912f;hpb=103291b11e8af8361ce0cd19d430dc3cf3d56192;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/classes/LanguageHy.php b/languages/classes/LanguageHy.php index 7cedcc523c..05b0ebed04 100644 --- a/languages/classes/LanguageHy.php +++ b/languages/classes/LanguageHy.php @@ -47,17 +47,17 @@ class LanguageHy extends Language { # matter if they are wrong sometimes. Just add a special case for your site name if necessary. # join and array_slice instead mb_substr - $ar = array(); + $ar = []; preg_match_all( '/./us', $word, $ar ); if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) { switch ( $case ) { case 'genitive': # սեռական հոլով - if ( join( '', array_slice( $ar[0], -1 ) ) == 'ա' ) { - $word = join( '', array_slice( $ar[0], 0, -1 ) ) . 'այի'; - } elseif ( join( '', array_slice( $ar[0], -1 ) ) == 'ո' ) { - $word = join( '', array_slice( $ar[0], 0, -1 ) ) . 'ոյի'; - } elseif ( join( '', array_slice( $ar[0], -4 ) ) == 'գիրք' ) { - $word = join( '', array_slice( $ar[0], 0, -4 ) ) . 'գրքի'; + if ( implode( '', array_slice( $ar[0], -1 ) ) == 'ա' ) { + $word = implode( '', array_slice( $ar[0], 0, -1 ) ) . 'այի'; + } elseif ( implode( '', array_slice( $ar[0], -1 ) ) == 'ո' ) { + $word = implode( '', array_slice( $ar[0], 0, -1 ) ) . 'ոյի'; + } elseif ( implode( '', array_slice( $ar[0], -4 ) ) == 'գիրք' ) { + $word = implode( '', array_slice( $ar[0], 0, -4 ) ) . 'գրքի'; } else { $word .= 'ի'; }