'a', 'ⴱ' => 'b', 'ⴳ' => 'g', 'ⴷ' => 'd', 'ⴹ' => 'ḍ', 'ⴻ' => 'e', 'ⴼ' => 'f', 'ⴽ' => 'k', 'ⵀ' => 'h', 'ⵃ' => 'ḥ', 'ⵄ' => 'ɛ', 'ⵅ' => 'x', 'ⵇ' => 'q', 'ⵉ' => 'i', 'ⵊ' => 'j', 'ⵍ' => 'l', 'ⵎ' => 'm', 'ⵏ' => 'n', 'ⵓ' => 'u', 'ⵔ' => 'r', 'ⵕ' => 'ṛ', 'ⵖ' => 'ɣ', 'ⵙ' => 's', 'ⵚ' => 'ṣ', 'ⵛ' => 'c', 'ⵜ' => 't', 'ⵟ' => 'ṭ', 'ⵡ' => 'w', 'ⵢ' => 'y', 'ⵣ' => 'z', 'ⵥ' => 'ẓ', 'ⵯ' => 'ʷ', ]; public function getMainCode(): string { return 'zgh'; } public function getLanguageVariants(): array { return [ 'zgh', 'zgh-latn' ]; } public function getVariantsFallbacks(): array { return []; } protected function loadDefaultTables(): array { return [ 'zgh-latn' => new ReplacementArray( self::TO_LATIN ), 'zgh' => new ReplacementArray() ]; } public function translate( $text, $toVariant ) { // We only convert zgh (zgh-Tfng) to zgh-Latn, not the // other way around. We also don't need to try to // convert if there is no text. if ( $toVariant === 'zgh' || !trim( $text ) ) { return $text; } $this->loadTables(); $text = $this->mTables[$toVariant]->replace( $text ); return $text; } }