php - Returning search results for different language -
i have simple site dropdown has primary options apple, bananas, pears etc, user selects option , clicks search , site returns results article primary tag matches option, it's done using simple primary_tag=primary_option condition. in english, user has come along , wants install copy of site , change apple, bananas, pear arabic language apple becomes تفاحة in dropdown , in articles. gets no search results although has tagged articles تفاحة rest of site stays same , has utf-8 character encoding believe supports arabic text. why not working , can work?
edit 1 - sample code
$primary_option = preg_replace('/^-|-$|[^-a-za-z0-9 ]/', '', $_get['primary_option']);
then
'key' => 'primary_tag', 'value' => $primary_option, 'compare' => 'like'
then
if ($results->have_posts())
just realised preg_replace causing issue.
Comments
Post a Comment