• Resolved GuardianAngel

    (@guardianangel)


    Hi!

    It looks likes once you want to make one site translatable the plugin thinks it’s a translation all the other translatable blogs even if they are unrelated (which makes it very difficult to track down what posts/pages belong to which blog, what’s left to translate, etc…).

    Is this in accurate assessment of the situation and is there anything that can be done about it, is there any way to restrict what is shown and for multiple translatable blogs?

    Thank you!

    Nick

    https://www.ads-software.com/plugins/multisite-language-switcher/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    No, the Multisite Language Switcher works a little bit differently:

    You can configure 2 or more blogs in a network and the plugin would link to the homepages of the blogs because it doesn’t know any translation. But you can also configure it that the plugin shows just links if there is really a translation …

    If you go to the WordPress backend – with an activated Multisite Language Switcher – you’ll see that you can understand whether the translation is connected or not thanks to the icons showing it.

    Cheers,
    Dennis.

    Thread Starter GuardianAngel

    (@guardianangel)

    Hi and thank you for your answer!

    I have installed it… (and had installed it before my post)

    What I saw is that As soon as I had more than two blogs configured they were all considered to be a translation of the same blog as it showed the status of the translation of totally unrelated blogs.

    I had multiple times the same flags displayed for each posts and the possibility to link these posts to posts of totally unrelated blogs.

    For example (and this is why I love how your plugin works, the two separate blog idea which permit different localized domain names):

    let’s say I have

    blog1.example.com (English)
    blog1.exempel.com (German, I hope…)
    blog1.esempio.com (Italian, I hope…)

    blog2.example.com (English)
    blog2.exempel.com (German, I hope…)
    blog2.esempio.com (Italian, I hope…)

    blog1 and blog2 are available in the same 3 languages but are otherwise unrelated, the content is quite different.

    In the “Post” screen, they are all thought to be related and we are shown the status of completion twice for each language since they are all thought to be the same blog…

    Is this due to a misconfiguration on my part or by design?

    (From reading other posts I had the impression this might be by design…)

    Thank you!

    Nick

    Plugin Author Dennis Ploetner

    (@realloc)

    This setup is maybe a little bit different from the common setup but there is a way to have these 2 groups of blogs separated. You could place some code in the functions.php (these 2 groups use probably 2 different themes) how I wrote here: https://github.com/lloc/Multisite-Language-Switcher/wiki/Change-the-blog-collection

    Thread Starter GuardianAngel

    (@guardianangel)

    Hi!

    Out of curiosity, what is the common setup, a single blog in multiple languages?

    So if I understood you right you would differentiate the two blogs by the theme they use?

    Out of curiosity (but I am not sure I could do it, the little PHP I know is verrry rusty), would it be possible to add another field in the setup screen and it that field is filled in only show the blog with the same data in that field?

    (ie a way to regroup those blogs using a common identifier… In its simplest expression it could be a text field)

    Is that (easily, like I said the little PHP skills I have are verry rusty) doable?

    Thank you and have a nice day!

    Nick

    Plugin Author Dennis Ploetner

    (@realloc)

    Yes, I know a lot of setups like this. But there is no problem with your setup, you can differentiate 2 blogs or categories of blogs in the way I indicated before but you can also choose to set the option “Reference user” … there are many other ways too but in this case (and because you wrote that adding PHP might be a problem) I would suggest to use this option.

    Just create a new user which can access the blogs you like and set the reference user for your blogs in this way: User A is the reference user for all of the blogs of the category A and User B is the reference for the blogs in category B. That’s it.

    Cheers,
    Dennis.

    Thread Starter GuardianAngel

    (@guardianangel)

    Hi Dennis!

    I installed the code you referred to as a plugin (ie “Change the blog collection”)

    Is there a way from that filter to know what is the blog id of the current blog to be able to return the appropriate populated array depending on this?

    Even better, if I were to add another field in your setup screen (an ID that would be shared by all sites which are supposed to be a translation of each other), is there a way to query it from that filter (or for the code that calls that filter)? If there is, I might try to do it (the little PHP I know is quite rusty but I am no stranger to programming…).

    Thank you and have a nice day!

    Nick

    Plugin Author Dennis Ploetner

    (@realloc)

    No, there is nothing you can add to the configuration. And there are no plans to add a functionality like that for now. But it seems if you added a custom plugin that your plugin should have some setup too, right? ??

    Read on here: https://kovshenin.com/2012/the-wordpress-settings-api/

    You can get the id of the current blog in this way:

    MslsBlogCollection::instance()->get_current_blog()->userblog_id;

    Cheers,
    Dennis.

    Thread Starter GuardianAngel

    (@guardianangel)

    Hi,

    I am not sure we fully understood each other, the little PHP I know is quite rusty but I sure can code/program. What I was suggesting I was not asking you to do, I wanted to know if you thought it was doable so I might actually try to code/program it.

    I was wondering if, if I were to modify the source code to add another field, you thought what I was suggesting could actually be done (ie only display in the list blogs with the same new identifier I would add). If you add told me this was entirely not possible I would not try but your response suggests that it could indeed work.

    The “plugin” I added is essentially the link you referred me to, https://github.com/lloc/Multisite-Language-Switcher/wiki/Change-the-blog-collection, with a “header” (ie the comment lines) to make WordPress believe it’s actually a plugin so no, it doesn’t have a setup screen.

    I guess someone could either add the functionality I was asking about in your plugin or in that fake plugin filter if one wanted not to modify your plugin source code.

    Thank you very much for your help!

    Nick

    Plugin Author Dennis Ploetner

    (@realloc)

    No problem. You asked if it is possible to add a field to the configuration of the Multisite Language Switcher. But I would do that in your custom plugin. It’s not that hard and you could store everything you need for your sites/network there.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Possible to have more than one site translatable at the same time?’ is closed to new replies.