WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Development of Polylang version 0.7 (21 posts)

  1. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I made available a development version of Polylang v0.7. You can download it here. I recommend to use it for tests only but feedback and bug reports will be appreciated.

    Here are the improvements:
    * Add Hebrew translation contributed by ArielK
    * Add support for RTL languages for both frontend and admin
    * Twenty Ten and Twenty Eleven languages files are now automatically downloaded when creating a new langage
    * Improve filtering tags by language in the edit post panel
    * Category parent dropdown list is now filtered by language
    * Category parents are now synchronized between translations
    * Add the possibility to have the language information in all URL (although I do not recommend using this option, I finally added it since I received lot of requests : it may be useful for people migrating their site from another multilingual plugin).
    * Add support for post formats
    * Add option allowing not to show the current language in the language switcher (for both menu and widget)
    * Add a title attribute (and the possibility to personalize it with a filter) to flags
    * pll_get_post and pll_get_term second parameter is now optional and defaults to current language
    * Add pll_the_language_link filter allowing to filter translation links outputed by the language switcher
    * The option PLL_DISPLAY_ALL is no longer supported
    * Bug correction: Autosave reset to default language
    * Bug correction: blog info not translated in feeds
    * Bug correction: post comments feed always in default language
    * Bug correction: Undefined index notice when setting up a custom menu widget

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I just updated the development version with the following changes:

    * Updated Dutch, German, Greek and Hebrew translations
    * Updated documentation (now includes the new features from v0.7)
    * Bug correction: rewrite rules are not correctly reset when deactivating the plugin
    * Bug correction: is_home not correctly set on pages 2, 3...
    * Bug correction: avoid naming conflicts (in sql queries) with other themes / plugins
    * Bug correction: bad language detection and url rewriting of custom post types archives

  3. cybup
    Member
    Posted 2 years ago #

    Chouby, your plugin is exactly what I would have expected to get. A simple, yet functional! Great work.

    I started testing it a few weeks ago (on WP3.3.1) and recently I updated to v0.7 and it seems like custom post types are translated properly but not the style and frontend language. This works ok on pages and regular posts though.

    For example, when I have two languages, HE that is RTL (default) and EN that is LTR, and I switch the language of specific custom post from HE to EN (on the frontend) I still see that the custom post type uses dir="rtl", lang="he-IL", and rtl.css (instead of dir="ltr", lang="en-US", and style.css only).

    Any suggestions on how to fix it?

    Thanks!

  4. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I believe I found what's still wrong. In 0.7dev14, in include/core.php at line 67, replace:

    foreach (array('feed_link', 'author_link', 'year_link', 'month_link', 'day_link') as $filter)

    by

    foreach (array('feed_link', 'author_link', 'post_type_archive_link', 'year_link', 'month_link', 'day_link') as $filter)

    Does it fix your problem ?

  5. cybup
    Member
    Posted 2 years ago #

    Thanks the prompt response! No, after replacing this specific line in 0.7dev14 I get the same behavior as I described above.

  6. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    Have you a link ?

  7. cybup
    Member
    Posted 2 years ago #

    Chouby, I do have a link but at this point I prefer to share it in private (via email maybe).

  8. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    You can post it here

  9. cybup
    Member
    Posted 2 years ago #

    I sent it now. You can reply to me via email or here. Appreciate...

  10. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I do not reproduce the bug on my test site (I use the Twenty Ten theme for tests). I wonder. Can you edit your English post and check the language ? If you started developing your site with 0.6.1 or older, it is possible that the language came back to default (Hebrew) although you set it correctly first due to this bug (now corrected in 0.7).

  11. cybup
    Member
    Posted 2 years ago #

    I started with a version prior to 0.7. Then upgraded and created new posts (like the one we discussed).

    1. I checked again the English version of my post and it is 'English'.
    2. I switched between the two languages, saved, switched back to English, and saved. Same result.
    3. I tried to change the Language Settings of WordPress (via Settings->General). Same result.
    4. Changing the permalink structure didn't help either (domain.com/custompostype/postname/ vs. domain.com?custompostype=postname).

    Is there a function I can use in my Theme to display the current language of a post? What about a way to force a specific language on the frontend accordingly?

  12. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    Let's try something else... Could you check if there is a conflict with the theme (try Twenty Ten) or with another plugin ?

  13. cybup
    Member
    Posted 2 years ago #

    I deactivated all installed plugins other than Polylang and nothing changed. I also switched to the Twenty Ten theme and received the same behavior.

    This behavior is clearly seen when you mixed LTR and RTL languages.

    BTW, can you please check if the 'Text Direction' settings of the plugin is used correctly? It seems like the value is always 'Left to Right' regardless the setting (but maybe only the read is not done properly).

  14. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    Everything is working well on my test site. I do test with a LTR and a RTL language.

    I don't believe that it is linked to RTL however. For some reason I do not understand yet, Polylang does choose Hebrew instead of English. The fact that Hebrew is RTL should not change anything. Except if you tell me that you edit the Hebrew language and set it to LTR and everything is working well !

    If you switch your default language from Hebrew to English, does the theme switch to English on both posts or does it stay in Hebrew as now ?

    How do you setup your custom post type ? I do that in a function hooked to the init action.

  15. cybup
    Member
    Posted 2 years ago #

    It seems like both html language and direction are always determined by the default language. Now my default is Hebrew and I always see
    dir="rtl" lang="he-IL" no matter what is the language of the post. When I change the default to be English I always see dir="ltr" lang="en-US" no matter what is the language of the post.

    I created the custom post type using register_post_type() function, in addition save_post action, and add_meta_boxes action. Nothing special really.

  16. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    When do you call register_post_type ?

    I don't believe it comes from a conflict in save_post action as you wrote that the language is correctly set on the admin side. So it is correctly saved.

  17. cybup
    Member
    Posted 2 years ago #

    I have register_post_type() within custom_post_creation() function and then I use add_action( 'init', 'custom_post_creation' );

    all above exists in functions.php of my theme.

  18. cybup
    Member
    Posted 2 years ago #

    btw, my earlier reply about default language settings relates to the Polylang plugin default language settings (and not WP general settings).

    To make sure I was clear, I indicated that both language and direction (frontend html) are always determined by the default language setting of the Polylang plugin and regardless the language setting of the specific post.

  19. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    It took time but finally I reproduced the bug !!!

    It happens only when hiding the language code for the default language. I will look at the code and come back soon.

  20. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I believe that I finally fixed it !

    In include/core.php, edit line 293 and replace:

    (isset($qvars['post_type']) && $qvars['post_type']) ))

    by

    (isset($qvars['post_type']) && $qvars['post_type'] && is_archive()) ))

    Thanks for the bug report and your patience !

  21. cybup
    Member
    Posted 2 years ago #

    I'll continue checking it further and keep you updated if I encounter other issues however according to my recent tests it works as expected now. Great work Chouby, thanks!

    Will follow your progress and new versions. Good luck.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic