tertiaryCollator = Collator::create( 'fa' ); } public function getPrimarySortKey( $string ) { $firstLetter = mb_substr( $string, 0, 1 ); if ( $firstLetter === 'و' || $firstLetter === 'ا' ) { return $this->tertiaryCollator->getSortKey( $string ); } return parent::getPrimarySortKey( $string ); } }