Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F8108146
LanguageYue.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
663 B
Referenced Files
None
Subscribers
None
LanguageYue.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
use
MediaWiki\Language\Language
;
/**
* Cantonese (粵語)
*
* @ingroup Languages
*/
class
LanguageYue
extends
Language
{
private
const
WORD_SEGMENTATION_REGEX
=
'/([
\x
c0-
\x
ff][
\x
80-
\x
bf]*)/'
;
/** @inheritDoc */
public
function
hasWordBreaks
()
{
return
false
;
}
/**
* Eventually, this should be a word segmentation;
* but for now just treat each character as a word.
* @todo FIXME: Only do this for Han characters...
*
* @param string $string
* @return string
*/
public
function
segmentByWord
(
$string
)
{
return
self
::
insertSpace
(
$string
,
self
::
WORD_SEGMENTATION_REGEX
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Dec 8, 03:47 (1 d, 14 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
17/7a/44c4bf3af669f41ecb3274d17439
Default Alt Text
LanguageYue.php (663 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment