WordPress.org

Ready to get started?Download WordPress

Forums

012 Ps Multi Languages
Links.. (5 posts)

  1. ones
    Member
    Posted 1 year ago #

    Hello i want to change from myadress.com/?lang=en to myadress.com/en
    It's possible? How i can do that?

    That's plugin it's great!

    http://wordpress.org/extend/plugins/012-ps-multi-languages/

  2. Wang Bin
    Member
    Plugin Author

    Posted 1 year ago #

    Hello ones
    You can customize, you can
    However, this plugin does not support such a response.

  3. ones
    Member
    Posted 1 year ago #

    Wang Bin wrote:

    Hello ones
    You can customize, you can
    However, this plugin does not support such a response

    But how i cna customize it? WItch htaccess? In mine server witch web.confing? Or how? I need to customize it..

  4. mettzed
    Member
    Posted 1 year ago #

    I'm coding embryo but I guess you should edit ps-multi-languages.php. There is this code in the file.

    function get_multilingual_request_uri($url ,  $lang ){
    
    		if ( preg_match( '|\?lang='. $lang .'|' , $url) ||  preg_match( '|&lang='. $lang .'|' , $url ) ){
    			return $url;
    		}elseif( preg_match( '|\?lang=[\w]{2}|' , $url) ){
    			return preg_replace('|(\?)lang=([\w]{2})|' , "$1lang=" . $lang , $url);
    		}elseif( preg_match( '|&lang=[\w]{2}|' , $url) ){
    			return preg_replace('|(&)lang=([\w]{2})|' , "$1lang=" . $lang , $url);
    		}else{
    			if ( preg_match('|\?[\w]+=|', $url, $m )){
    				return $url . '&lang=' . $lang;
    			}else{
    				return $url . '?lang=' . $lang;
  5. ones
    Member
    Posted 1 year ago #

    Yes i find this and i edit that, but nothing happen. It's don't help to edit that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.