Title: jayhall's Replies | WordPress.org

---

# jayhall

  [  ](https://wordpress.org/support/users/jayhall/)

 *   [Profile](https://wordpress.org/support/users/jayhall/)
 *   [Topics Started](https://wordpress.org/support/users/jayhall/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jayhall/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jayhall/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jayhall/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jayhall/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jayhall/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Languange issue on pdf invoice](https://wordpress.org/support/topic/languange-issue-on-pdf-invoice/)
 *  [jayhall](https://wordpress.org/support/users/jayhall/)
 * (@jayhall)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/languange-issue-on-pdf-invoice/page/2/#post-8746987)
 * I’m wondering why you made this
 * $wpo_wcpdf->get_woocommerce_totals()
 * in the invoice template dependent on the wc textdomain.
 * The problem is that this part of the invoice is translated to the
    admin user
   language.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Default language not working](https://wordpress.org/support/topic/default-language-not-working-2/)
 *  [jayhall](https://wordpress.org/support/users/jayhall/)
 * (@jayhall)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/default-language-not-working-2/#post-8741595)
 * jon, we need some more infomation to resolve this.
 * what are your exact polylang url settings ? check your static front page (wordpress
   => setting => reading). make sure the albanian home page is selected.
 * best, jayhall
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Polylang and WooCommerce – Language gets lost on Product Pages](https://wordpress.org/support/topic/polylang-and-woocommerce-language-gets-lost-on-product-pages/)
 *  Thread Starter [jayhall](https://wordpress.org/support/users/jayhall/)
 * (@jayhall)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/polylang-and-woocommerce-language-gets-lost-on-product-pages/#post-8740581)
 * after looking into
    /wp-content/plugins/polylang/frontend/choose-lang-content.
   php and /wp-content/plugins/polylang/frontend/choose-lang-content.php
 * if found the solution by setting the preferred language (if not the default language)
   a second time based on the pll_language cookie value.
 * Luckily the author has provided a filter hook:
 *     ```
       function bs_set_preferred_lang_by_cookie($lang) {
       	if (isset($_COOKIE['pll_language'])) {
       		if($_COOKIE['pll_language']=='en'){
       			global $polylang;
       			$lang = $polylang->get_preferred_language();
       		}
           }
           return $lang;
       }
       add_filter('pll_get_current_language', 'bs_set_preferred_lang_by_cookie');
       ```
   
 * If you opt for “set language by content” and don’t want to translate / synchronize
   identical categories and posts (like me) then this seems to be the way to go.
   I haven’t tried it yet but theoretically this should work, even if your content
   doesn’t have assigned any language at all.
 * The drawback of my solution is that when i itend to switch back to the default
   language, i have to go back to the home page in order to reset the preferred 
   language.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] redirect to wrong language, every time](https://wordpress.org/support/topic/redirect-to-wrong-language-every-time/)
 *  [jayhall](https://wordpress.org/support/users/jayhall/)
 * (@jayhall)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/redirect-to-wrong-language-every-time/#post-8740069)
 * Hi, here are just a few thoughts on this:
 * – what is your PLL url modification setting ? Remember, when you choose “by content”,
   the language is determined by content. Post all *PLL* settings here !
    – are 
   there translations of the homepage for *all* languages ? – switch temporarily
   to an uncostomized theme and check the behaviour again. – check your browser 
   PLL language cookie and delete it before you hit the page initially.
 * regards, jayhall
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] One page for all languages](https://wordpress.org/support/topic/one-page-for-all-languages/)
 *  [jayhall](https://wordpress.org/support/users/jayhall/)
 * (@jayhall)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/one-page-for-all-languages/#post-8739901)
 * Hi Pierre,
    does this plugin work for WooCommerce Categories and posts (Products)
   as well ? Or only for pages ? What does your polylang url settings look like ?
   Set language by content or by url ? thanks

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