Title: Integration with Polylang plugin
Last modified: May 31, 2017

---

# Integration with Polylang plugin

 *  Resolved [napoland](https://wordpress.org/support/users/napoland/)
 * (@napoland)
 * [9 years ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/)
 * hey, we are working on preparing an English version of our Polish website.
    We
   are planning to use Polylang plugin for that. It works just great with the meetings
   plugin when we put language as domain prefix, like that: [https://en.anonimowinarkomani.org/meetings/](https://en.anonimowinarkomani.org/meetings/)
 * but in this case we need to buy another SSL certificate for this subdomain.
 * That’s why we would prefer to put the language as a “subfolder”
    [https://www.anonimowinarkomani.org/en/meetings/](https://www.anonimowinarkomani.org/en/meetings/)
 * but in this case the meetings plugin stops working.
 * Do you think it would be easy to fix this?
    if not, we will probably buy the 
   SSL certificate (it costs 25$ /year)
 * thanks,
    NA Poland Webmaster

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

 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [9 years ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9185014)
 * Hey,
 * I don’t know, could you show me a demo, or describe what you mean by ‘stops working?’
 * When I install the plugin on my test site I’m not able to get it to work at all
   without manually translating all the pages on my site. Would you need to translate
   the meeting pages?
 * The main list ‘page’ isn’t a page, it’s a custom post type archive, so I’m not
   sure that’s translatable.
 * But sounds like it’s working with the subdomain, so perhaps that’s the way to
   go. $25 doesn’t seem like a lot to spend.
 *  Thread Starter [napoland](https://wordpress.org/support/users/napoland/)
 * (@napoland)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9221438)
 * I’m not sure if the plugin can translate the whole website for you. We want to
   translate just several pages. We’ve bought the certificate, but now there’s a
   different problem which I haven’t spotted earlier:
 * After activating the plugin some labels on the polish version of the site are
   shown in english (only the day names and meeting types). see screenshots:
 * [https://ibb.co/d4NySa](https://ibb.co/d4NySa)
    [https://ibb.co/gJyitF](https://ibb.co/gJyitF)
 * it works fine after disabling the plugin.
    I’m not sure if the bug is in one 
   of the plugins or in wordpress itself.
 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9222522)
 * The issue is that something which translates fine when WP is set to Polish is
   not translated when using Polylang and viewing the site in Polish?
 * This probably is beyond the scope of this support thread, but I would like to
   figure out how to set it up.
 * Can you walk me through the steps to set it up with 12 Step Meeting List? I installed
   the plugin, added alternate languages, and added a language switcher. How do 
   I create an alternate version of the meetings list page? I can’t figure out how
   to view it in another language.
 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9222900)
 * Hi Oclair,
 * Arek translated the plugin into Polish, and so what’s odd is that if he removes
   Polylang, that the meeting types will be in Polish. But with Polylang, they are
   in English.
 * It’s as if at the time the plugin is loaded, it’s saying ‘use English,’ but then
   when it comes time to make they page, Polylang says ‘actually never mind, use
   Polish.’
 * On your site on the other hand you’re referencing languages into which the plugin
   hasn’t been translated yet. If you know someone who wants to translate, we can
   see if we can add them as an authorized translator like we added Arek for Polish.
 *  Thread Starter [napoland](https://wordpress.org/support/users/napoland/)
 * (@napoland)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9222977)
 * Hi Josh, answering your first question – this is exactly the case. Something 
   which translates fine when WP is set to Polish is not translated when using Polylang
   and viewing the site in Polish.
 * I did not need to create an alternate version of the meetings page. In Polylang
   settings I choose the option to detect the language from the subdomain, so when
   I enter:
    [http://www.mydomain.com/meetings](http://www.mydomain.com/meetings)–
   it shows the page in a default language (Polish) en.mydomain.com/meetings – it
   shows the page in subdomain language (English)
 * We are showing the same meetings list in both cases. We don’t care that the meeting
   name and description are not translated, we just want to have correct labels.
   As I said it works automatically – the plugin detects the language correctly 
   and it uses correct labels for each language version, apart from the two examples
   shown above.
 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9223136)
 * I was able to get Polylang working finally and can see the problem you describe.
   It is a question of timing. At the time that includes/variables.php is evaluated(
   and translated) the plugin is set to one language, but when it comes time to 
   execute the page, the language has been changed by Polylang, and so the gettext
   filters will all need to be run again.
 * The solution, it appears, is to wait for the `plugins_loaded` hook to set the
   plugin’s strings, although this is potentially a big change for a lot of sites,
   because it will mean that you can’t simply override things in the same way anymore.
 * I need to think a little bit about how this should be done and test it before
   committing this change, but if you want to try the bleeding edge which I think
   should (maybe) fix the issue, try the version on Github: [https://github.com/meeting-guide/12-step-meeting-list](https://github.com/meeting-guide/12-step-meeting-list)
 *  Thread Starter [napoland](https://wordpress.org/support/users/napoland/)
 * (@napoland)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9223391)
 * Hi, using the GitHub version seems to solve this problem for us. Thanks. I did
   not understand what are the complications for other sites, so I leave it to you
   🙂
 * I noticed one more thing:
    the links in the english version of the page lead 
   to default polish version, check here: [https://en.anonimowinarkomani.org/meetings/?tsml-day=any](https://en.anonimowinarkomani.org/meetings/?tsml-day=any)
 * if you click the meeting details link it goes to [http://www.anonimowi&#8230](http://www.anonimowi&#8230);
   Making the links relative instead of absolute would solve the thing. Would it
   be easy to change that?
 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9224966)
 * Hm yeah I see that issue. We’re using the standard WordPress `get_permalink()`
   function to get those links, which I want to keep doing.
 * I will investigate it some more, but my guess is that this is something that 
   should be handled in your theme. There is a hook you can use, perhaps your solution
   would look like this:
 *     ```
       function strip_domain_name($url, $post, $leavename=false) {
       	if (!in_array($post->post_type, array('tsml_meeting', 'tsml_location'))) return $url;
       	//do something here to remove or fix the domain
       	return $url;
       }
   
       add_filter('post_type_link', 'strip_domain_name', 100, 3);
       ```
   
 * If you end up fixing it with this let me know what you did. I don’t want to modify
   core WordPress behavior any more than I have to.
    -  This reply was modified 8 years, 12 months ago by [meetingguide](https://wordpress.org/support/users/meetingguide/).
      Reason: fixing code block formatting
 *  Thread Starter [napoland](https://wordpress.org/support/users/napoland/)
 * (@napoland)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9225100)
 * ok, will try that. thanks!
 *  [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * (@meetingguide)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9246985)
 * The Polylang fixes that the ticket originally referenced were incorporated into
   the plugin core in the latest update (2.13.1). Closing ticket.

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

The topic ‘Integration with Polylang plugin’ is closed to new replies.

 * ![](https://ps.w.org/12-step-meeting-list/assets/icon-256x256.png?rev=2233591)
 * [12 Step Meeting List](https://wordpress.org/plugins/12-step-meeting-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/12-step-meeting-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/12-step-meeting-list/)
 * [Active Topics](https://wordpress.org/support/plugin/12-step-meeting-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/12-step-meeting-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/12-step-meeting-list/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [meetingguide](https://wordpress.org/support/users/meetingguide/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/integration-with-polylang-plugin/#post-9246985)
 * Status: resolved