• Hi again concerning this plugin.

    1/ I need to be able to translate the permalink, how can I do that? Is it possible or will it possible in a next version? It seems important for good SEO…

    2/ When a visitor posts a comment, his comment appear for the post but in ALL languages. Is there a way to filter on the language? Ex: if I post a comment for the post in french, I don’t want to see it in the english version.

    Thanks in advance,
    David

Viewing 11 replies - 1 through 11 (of 11 total)
  • as for first question – i am already have such request from Lukas Konaric (checz wp_multilingual localizer)

    as for second one, – i see a reason in your words.

    i am not tell for sure – that requests will be at next version, but i will try to do it asap.

    Thread Starter pirusan

    (@pirusan)

    Thanks for your answer and for your reactivity. I’ll try to be patient once (regarding of my previous post concerning the WYSIWYG editor). But those two points are important for me.

    Read you soon,
    David

    Thread Starter pirusan

    (@pirusan)

    Hi again,

    If I use the wordpress function get_permalink() for a post or a page, I have not the language in the generated URL. How to make it appear correctly in the URL ?

    For example: I have a page “Login” with the ID = 14. When I use get_permalink(14), I get “http://www.example.com/blog/login” assuming my blog is in the “/blog/” directory.

    Thanks in advance for the tip or the new feature.

    Greatings,
    David

    Thread Starter pirusan

    (@pirusan)

    In fact, I’m generating some permalinks in the “functions.php” of my theme (derived from the classic one) and the $GLOBALS[‘language’] in not yet know. I finally use the following code: $loginPermalink = get_permalink(get_page_by_path('login')->ID);

    Not a bug or a missing feature šŸ™‚

    David

    i will try to make butifull release 1.4 hope i can add this feature too.

    Thread Starter pirusan

    (@pirusan)

    Hi,

    I just wrote a new function called “get_permalink_by_path” as follow:

    function get_permalink_by_path( $path, $output = OBJECT ) {
    
        if ( !$page = get_page_by_path($path) ) return NULL;
        return get_permalink($page->ID);
    
    } // end of 'get_permalink_by_path()'

    It work fine for me. The thing you can add is that the $GLOBALS[‘language’] would be available before the “functions.php” file of a template is loaded.

    One other thing I noticed: my default language is english for a blog. When I switch to french for example and I click on the header to go to the home, the language switch back to english instead of keeping french? how to keep a choosen language even for this situation?

    Last point, I there a way to check the HTTP_ACCEPT_LANGUAGE to determine the language of the user (his browser in fact)? I would be a nice feature to had.

    Thanks in advance,
    David

    Hi, David,
    to keep the language when clicking on the header, if you’re using WordPress default Kubrick theme, in header.php, instead of

    <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

    try using

    <h1><a href="<?php echo get_option('home'); ?>/<?php echo $language; ?>"><?php bloginfo('name'); ?></a></h1>

    Cheers,
    Beto

    Thread Starter pirusan

    (@pirusan)

    Hi Beto,

    Thanks for the tip, it’s fine now!

    David

    Thread Starter pirusan

    (@pirusan)

    Hi,

    I still need the ability to translate the permalink, when do you think it will be possible?

    And I still need to filter comments by language, will it be possible?

    Thanks in advance,
    David

    i dont know… but you can try!

    Thread Starter pirusan

    (@pirusan)

    Hi,

    I’ve juste created an extension which allow to translate the slug of a post (not a page at this moment). It require WP_Multilingual.

    You can download it at this address: http://projects.maleo.net/wp-multilingual-extended/

    It adds a “Permalinks” box in the edit box of a post, with one input by WP_Multilingual declared language. During saving, it creates a post meta name “post_slug_{language}” (ex: “post_slug_fr”). It take the title of the post by default (or the titles of each language by default).

    In the front site, it take the “post_name” of each post to replace it by the “post_slug_{language}” of the current language.

    The only “oooops” for this plugin is that we need to modify the “get_post” function of the core of WP located in the file “/wp-includes/post.php”: we need to add the line: apply_filters('get_the_post', $_post); just after: $_post = sanitize_post($_post, $filter); I don’t find any existing hook for the purpose of this plugin.

    For this version of the plugin, there is no check of a possible duplicated slug, no possilibity to translate pages slugs. It’s first a proof of concept and, I hope so, a piece of code you could implement in your plugin.

    Cheers,
    David

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

The topic ‘[Plugin: WP_Multilingual] Permalink and comments’ is closed to new replies.