Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Language\ConstantLanguageGuesser Class Reference

A simple LanguageGuesser that returns the same "source language" for every node. More...

+ Inheritance diagram for Wikimedia\Parsoid\Language\ConstantLanguageGuesser:
+ Collaboration diagram for Wikimedia\Parsoid\Language\ConstantLanguageGuesser:

Public Member Functions

 __construct (Bcp47Code $langCode)
 
 guessLang (Element $node)
 
Parameters
Element$node
Returns
Bcp47Code predicted source language

 

Detailed Description

A simple LanguageGuesser that returns the same "source language" for every node.

Appropriate for wikis which by convention are written in a single variant.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Language\ConstantLanguageGuesser::__construct ( Bcp47Code $langCode)
Parameters
Bcp47Code$langCodea language code

Member Function Documentation

◆ guessLang()

Wikimedia\Parsoid\Language\ConstantLanguageGuesser::guessLang ( Element $node)

Parameters
Element$node
Returns
Bcp47Code predicted source language

Reimplemented from Wikimedia\Parsoid\Language\LanguageGuesser.


The documentation for this class was generated from the following file: