2010-01-04 08:28:50 +00:00
|
|
|
<?php
|
2012-06-08 20:42:57 +00:00
|
|
|
/**
|
|
|
|
|
* Malayalam (മലയാളം) specific code.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* @file
|
|
|
|
|
* @ingroup Language
|
|
|
|
|
*/
|
2010-01-04 08:28:50 +00:00
|
|
|
|
2010-10-10 12:53:37 +00:00
|
|
|
/**
|
|
|
|
|
* Malayalam (മലയാളം)
|
|
|
|
|
*
|
|
|
|
|
* @ingroup Language
|
|
|
|
|
*/
|
2010-01-04 08:28:50 +00:00
|
|
|
class LanguageMl extends Language {
|
|
|
|
|
/**
|
2021-08-03 18:02:52 +00:00
|
|
|
* Convert Unicode 5.0 style Malayalam input to Unicode 5.1, similar to T11413
|
|
|
|
|
* which is the same issue for Arabic.
|
2010-07-29 09:43:18 +00:00
|
|
|
*
|
2021-08-03 18:02:52 +00:00
|
|
|
* Also fixes miscellaneous problems due to mishandling of ZWJ (e.g. T13162).
|
2011-05-29 15:59:47 +00:00
|
|
|
*
|
2021-08-03 18:02:52 +00:00
|
|
|
* Originally introduced after "[wikitech-l] Unicode equivalence" (Dec 2009)
|
|
|
|
|
* <https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/LMMZ3M4757Z5DH42MT75K6GWLAKUBLRD>
|
|
|
|
|
*
|
|
|
|
|
* Optimization: This is language-specific to reduce negative performance impact.
|
2011-05-29 15:59:47 +00:00
|
|
|
*
|
2021-08-03 18:02:52 +00:00
|
|
|
* @param string $s
|
2011-05-29 15:59:47 +00:00
|
|
|
* @return string
|
2010-01-04 08:28:50 +00:00
|
|
|
*/
|
2018-08-01 18:49:22 +00:00
|
|
|
public function normalize( $s ) {
|
2010-01-04 08:28:50 +00:00
|
|
|
$s = parent::normalize( $s );
|
2021-08-03 18:02:52 +00:00
|
|
|
$s = $this->transformUsingPairFile( MediaWiki\Languages\Data\NormalizeMl::class, $s );
|
2010-01-04 08:28:50 +00:00
|
|
|
return $s;
|
|
|
|
|
}
|
|
|
|
|
}
|