WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Api function get_default_language (5 posts)

  1. Patrick Hesselberg
    Member
    Posted 1 year ago #

    Hi

    Just a suggestion.
    I'd love to have the get_default_language() in the api section so we developers can have this without making our own function.

    Seems like its already in admin-filters.php

    Thanks :)

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

  2. Patrick Hesselberg
    Member
    Posted 1 year ago #

    Or is there a reason not to use the default lang?

  3. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Hi!

    That's something which would not be difficult to add. But take care that get_default_language does not always return the default language but the language selected in the language filter (maybe I should rename this function as its current name can lead to misinterpretation). I guess you would like something similar as pll_current_language but available on both admin and frontend?

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    In v1.0, a new function 'pll_default_language' (with same options as 'pll_current_language'). Unlike 'pll_current_language', it will be available on both admin and frontend.

    The current development version is available:
    http://downloads.wordpress.org/plugin/polylang.zip

  5. Patrick Hesselberg
    Member
    Posted 1 year ago #

    So awesome! Cheers mate :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.