splittableLanguages = [ 'ar', 'ary', 'arz', 'ckb', 'fa', 'glk', 'ks', 'mzn', 'pnb', 'ps', 'sd', 'skr', 'ug', 'ur', 'as', 'bn', 'bpy', 'awa', 'bh', 'dty', 'gom', 'hi', 'ks', 'mai', 'mr', 'ne', 'new', 'pi', 'sa', 'gu', 'pa', 'kn', 'tcy', 'km', 'ml', 'or', 'si', 'ta', 'te', ]; } /** * Gets whether or not we can split words arbitrarily, for example when highlighting the user's query in the search * autocomplete widget. * * @param string $code * @return bool */ public function canWordsBeSplitSafely( string $code ): bool { return !in_array( $code, $this->splittableLanguages ); } }