Title: EDIT CODE WELGOT
Last modified: December 29, 2017

---

# EDIT CODE WELGOT

 *  Resolved [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/)
 * I have website and i have plugin Weglot, when will change website language, button“
   change language” change possition. I would lika have buttons always the same 
   possition, In weglot.php where I must change code ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fedit-code-welgot%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820009)
 * Hi,
 * I’m not sure I understand, you would like to have always the “PL” button on the
   left and always “EN” button on the right ?
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820021)
 * Exactly I would like have button “PL” on left side and button “EN” on right Side
   always
    -  This reply was modified 8 years, 3 months ago by [ldybiec](https://wordpress.org/support/users/ldybiec/).
 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820052)
 * ok, I see. In this case enter the following code in the field “Override CSS” 
   of the plugin.
 *     ```
       .wg-flags.en {
           float: right!important;
       }
       ```
   
 * Then save 🙂
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820091)
 * Thanks it works, but I have yet problem because when i click button”EN” i would
   like add on url “& wmc-currency=GBP” and when i click button “PL” will add “wmc-
   currency=PLN”.
 * I wrote variable “$value1 = ‘&wmc-currency=GBP’ ;” in weglot.php and I added 
   in code
 *     ```
        $list .= '<li class="wg-li ' . $flag_class . $d . '">
       <a data-wg-notranslate href="' . $link .$value1 .'">' 
       . ($withname ? ($full ? WGUtils::getLangNameFromCode( $d,false ) : strtoupper( $d )) : '') . '</a></li>';
       ```
   
 * it’s working, but on once side. Can you help me?
    -  This reply was modified 8 years, 3 months ago by [ldybiec](https://wordpress.org/support/users/ldybiec/).
 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820110)
 * For this I’m not sure, but what you did is good.
    What do you mean “for one side”?
   I went to your website [http://asgym.pl/](http://asgym.pl/) but I don’t see the
   currency=GBP
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820160)
 * Open the page [](http://asgym.pl/en/produkt/urzadzenie-cwiczen-miesni-lydek-lezac/?v=f52c8e5f65af&wmc-currency=PLN).
   I would like have, when I click button “PL” will be change currency on polish
   money ans the same when i click button”EN” currency will be change british money.
   I found plugin who add to url “&wmc-currency=PLN” and “&wmc-currency=GBP”.
 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820195)
 * Yes I see what you want to do but Weglot doesn’t allow this by default. It should
   be possible by changing some code but it can be hard.
    Maybe write: $value[‘en’]
   = ‘&wmc-currency=GBP $value[‘pl’] = ‘&wmc-currency=PLN
 * Then in the code, something like
 *     ```
        $list .= '<li class="wg-li ' . $flag_class . $d . '">
       <a data-wg-notranslate href="' . $link .$value[$d] .'">' 
       . ($withname ? ($full ? WGUtils::getLangNameFromCode( $d,false ) : strtoupper( $d )) : '') . '</a></li>';
       ```
   
 * I haven’t tested this code but it should be something around this
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9820473)
 * Everything of working, thank you so much
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9825259)
 * I have one more problem, because when I click the button “EN” in url add a new
   value “?wmc-currency=GBP” but when I click button “PL” currency doesn’t change
   becuse is added to the previous value, so url always appends add new value to
   old. How can I change code i weglot.php that i will change language old value
   currency will delete and will add new value. Can you open page asgym.pl and help
   me?
 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9846618)
 * You will need to detect the URL and remove the ?wmc-currency=GBP from the link
   so that you don’t have [http://asgym.pl/?wmc-currency=GBP?&wmc-currency=PLN](http://asgym.pl/?wmc-currency=GBP?&wmc-currency=PLN)
   but only
    [http://asgym.pl/?&wmc-currency=PLN](http://asgym.pl/?&wmc-currency=PLN)
   in the code you can use parse_url function on the link, then remove parameters
 *  Thread Starter [ldybiec](https://wordpress.org/support/users/ldybiec/)
 * (@ldybiec)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9916698)
 * Could you help me with function parse_url because I can’t do it.
 *  Plugin Author [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * (@remyb92)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9916727)
 * You can check the documentation about parse_url [here](http://php.net/manual/fr/function.parse-url.php)
   
   It will help you

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘EDIT CODE WELGOT’ is closed to new replies.

 * ![](https://ps.w.org/weglot/assets/icon-256x256.gif?rev=3333666)
 * [Translate WordPress with Weglot - Multilingual AI Translation](https://wordpress.org/plugins/weglot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/weglot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/weglot/)
 * [Active Topics](https://wordpress.org/support/plugin/weglot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weglot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weglot/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Weglot Translate Team](https://wordpress.org/support/users/remyb92/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/edit-code-welgot/#post-9916727)
 * Status: resolved