Forum Replies Created

Viewing 15 replies - 1 through 15 (of 150 total)
  • Forum: Reviews
    In reply to: [Sublanguage] F i n a l l y

    Thanks for review!

    My only concern is it will be abandonned

    This is an absolutly right concern! When q-Translate was abandonned years ago, I decided I would not trust any other plugin for a feature as essential as multi-language. That’s why I created Sublanguage in the first place.

    To the DEV: I hope you’re still working on it and have a team to support you.

    There isn’t but the plugin is on github: anyone can enroll! I’m still working on it because I use it on most website I develop, which is my main activity.

    Thank you for these informations, I’ll try to fix this issue.

    No it is currently not possible. What you can do is to create a custom post type and link every user to a post of this type.

    Maybe in the future…

    Hello,

    Please try to go in settings > Sublanguage and click save.

    Hello,

    Go to “Settings > Sublanguage”, then click the link “Edit translations” after “Translate Options”. You get a data tree representing all wordpress options, including those added by third-party plugins. Just find “blogdescription” and “blogname” (which are the keys for “Site Title” and “Tag Line”), expend and translate it.

    Hello, what is exactly your current version (you can check in the installed plugin list)? The download link in this comment actually point to the developing version, so it is not the same as 2 years ago!

    Also is your problem solved with this version?

    Can you try to install the last (developping) version of this plugin?

    The package is available here but you have to install it manually:
    https://downloads.wordpress.org/plugin/sublanguage.zip

    Sounds like some cache just expired. Do you use any cache plugin (or plugin to speed up page loading)?

    Hello,
    What exactly is wrong with the linked page? I wish I could help but I don’t really understand the problem…

    This warning is thrown in Sublanguage because it filters a function that is called (from somewhere else) with an incorrect number of arguments: as you can see there is actually 2 arguments for this functions, so it can’t be fixed in Sublanguage.

    apply_filters( 'the_title', string $title, int $id )
    (https://developer.wordpress.org/reference/hooks/the_title/).

    Also this problem is probably not the reason why you got a 500 code error.

    Sorry, there is multiple fatal errors caused by different things, including Autodescription and Wordfence plugins. Nothing looks directly related to Sublangauge. I can’t help you more with this.

    There is maybe a conflict with an other plugin or theme. Please try to deactivate one by one and check which causes problem.
    Also try to rebuild permalinks (go to settings > permalinks, click “save changes”).

    Hello,
    Sounds like Sublanguage is perfect for you. You’re welcome to have a try.
    Please refer to the faq for more info, and ask if you’ve further questions. Just keep in mind Sublanguage is free: support is not guaranteed.

    Hello,

    If the list is fetched with get_terms(), terms should be translated right out of the box:

    
    $terms = get_terms(array(
      taxonomy => 'post_tag',
      'hide_empty' => false
    ))
    
    foreach ($terms as $term) {
      echo $term->name; // -> term name translated in the current language
    }
    

    If it doesn’t work, that means terms are probably fetched otherwise. In this case you can use a sublanguage custom filter:

    
    echo apply_filters( 'sublanguage_translate_term_field', $term->name, $term, 'name');
    

    If you want to translate the term in an particular language:

    
    echo apply_filters( 'sublanguage_translate_term_field', $term->name, $term, 'name', 'en'); 
    // -> print term name in english no matter what the current language is
    

    Does it help?

    • This reply was modified 9 months, 2 weeks ago by maxime.

    Hello,
    First I can’t really answer this question without knowing exactly what your ajax/javascript is doing, but let’s say it’s a request for posts, like used in infinite scroll. What you need to do is just to send the language (“en”, “es”, “fr”, “de”, etc) within the ajax query parameters. Example with jQuery:

    
    $ajax.get(ajax_url, {
      action: 'get_some_posts'
      language: 'it',
      //... more parameters
    });
    

    Now if this request is made by an existent theme or plugin, you probably don’t want to edit javascript files directly. One solution is to add a script that will force jquery to send the current language parameter at every request. This script is added by Sublanguage when you enable “Use AJAX in Front-End” in Sublanguage settings. But it won’t necessarily work because ajax request are not always done by jQuery, and even if it is, the hook is not always triggered in some cases. This option is no longer activated by default, because jQuery is less and less popular (I’m no longer using it in my websites) and this will force a theme to load jQuery even if it is not using it at all.

    So if this doesn’t work, the last solution is to ask the plugin or theme author to provide a way to send custom parameters in ajax request.

    I hope this will help!

Viewing 15 replies - 1 through 15 (of 150 total)