News:

Support the VirtueMart project and become a member

Main Menu

how to change "search" in url?

Started by RedJohn, January 27, 2014, 17:13:11 PM

Previous topic - Next topic

RedJohn

Hi. How can i change url (/search/) from

www.domain.pl/search/any_keyword/

to

www.domain.pl/szukaj/any_keyword/

*"szukaj" mean "search" in polish language.

jjk

Create a copy of the search module and assign it the polish language. I would suggest to keep the the orginal but unpublish it, so you always have an original with it's default settings.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

RedJohn

Thanks for help.
mod_virtuemart_search is assign in the polish language, but still not working.

I see in router php


if ( isset($query['search'])  ) {
$segments[] = $helper->lang('search') ;
unset($query['search']);
}


maybe i have no filie ini in my language. Where Can i find it? [$helper->lang('search') ]

jjk

"szukaj" should be in the file \language\pl-PL\pl-PL.com_virtuemart.sef.ini around line 59:
COM_VIRTUEMART_SEF_SEARCH="szukaj"

Did you install the polish language pack for VirtueMart and set the site (frontend) language to Polish?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

RedJohn

#4
Thanks jjk
I have this file, and polish language is enabled in frontent site.
I try override language... but... still not working.

Actually i manually change post data from "search" to "szukaj" and add this code


  $_SERVER['REQUEST_URI'] = preg_replace('/(^\/szukaj\/)(.*?)(\/$)/','/search/$2/',$_SERVER['REQUEST_URI']);


Now it's better, but... I do not preferre change SERVER variable.

jjk

Maybe there is a typo somewhere in your polish language files or overrides which prevents pl-PL.com_virtuemart.sef.ini from loading. Sometimes happens if the system detects a parsing error in a language file. If you enable 'Debug System' and 'Debug Language' in your Joomla configuration, you might see such errors listed at the bottom of the page views.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations