WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Language Switcher
[resolved] New to multisite and using with WordPress 3.3 (39 posts)

  1. jenUnderscore_
    Member
    Posted 2 years ago #

    Hi there,
    I'd like to use this plug-in for a new multisite installation using WordPress 3.3.

    I've created two sites: /en and /fr

    I've installed the plugin and activated it under
    Netword Admin > Plugins > [Network Activate]

    I then went to Settings > Multisite Language Switcher
    on each of my websites (/en and /fr)

    This is where I'm a little stuck.. How do I tell the system that /en is my english version and fr is my french version? It appears that it sets them each to "us", but I don't know how to change that.

    Also, with this plug-in activated when I go to save a page I get the following error:

    Fatal error: Call to a member function get_language() on a non-object in C:\[...]\wp-content\plugins\multisite-language-switcher\includes\MslsMain.php on line 65

    What am I missing? or is this just a prob while you're bring the plug-in up to date with 3.3.

    http://wordpress.org/extend/plugins/multisite-language-switcher/

  2. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    You can set the language of each blog in Settings > General. If there is no option like "Site language" you have to install the language files you need (have a look at http://svn.automattic.com/wordpress-i18n/).

    I think that you get the error because there are no language files. I will check that. I use WordPress 3.3 for testing so it should work "out of the box".

  3. jenUnderscore_
    Member
    Posted 2 years ago #

    Thank-you for your reply - it was exactly what I was looking for.

    I got it working after first adding the *.mo files into my site (wp-content/languages), setting the language of each site in "General Settings", and then installing and configuring the "Multisite Language Switcher" plugin for each site.

    However, I had to reinstall WordPress and the "Multisite Language Switcher" plugin because I'm assuming my previous attempts at setting it up was causing conflicts (I was getting the "Fatal error: Call to a member function get_language() on a non-object in C:\[...]\wp-content\plugins\multisite-language-switcher\includes\MslsMain.php on line 65" error when tryign to update my english site, despite the fact I had installed my language files.

    In any case, everthing seems to be working now.

    Thank-you again for your quick response

  4. garybrant
    Member
    Posted 2 years ago #

    Does anyone know how to create a NEW multi-site in 3.3?

    I'm completely lost, all I have is "My Sites" and see no ability anywhere to act in Network Admin and create a new site from base domain.

    I've of course modified the wp-config.php and it was all working fine in 3.2.1.

    Thanks!

  5. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    Under "My sites" you should find "Network Admin" ... but you know that this has not much to do with the MSLS-Plugin?

  6. garybrant
    Member
    Posted 2 years ago #

    It's not there, but I plan to use your plugin once I get it working...

  7. jenUnderscore_
    Member
    Posted 2 years ago #

    garybrant, this question doesn't really belong here - that said, I recently set-up multisite for the first time (on WordPress 3.3)

    Start your search here: http://codex.wordpress.org/Create_A_Network

    I also found this article helpful: http://www.netmagazine.com/tutorials/build-multilingual-site-wordpress

    You probably just have something configured wrong. I recommend starting from scratch and taking it step-by-step.

  8. JonathanFokker
    Member
    Posted 2 years ago #

    He all,

    I do have the exact same problem as jenUnderscore_.
    I do have two sites (English and Spanish).
    I have set these sites to their languages in General Settings.
    The .mo files are there.
    I am using two different themes for each site.
    I've set up the Multisite Switcher for both sites individually.
    The language switcher only recognises one language (English) and I cannot update my site, just as jenUnderscore_
    Also tried to delete the plugin and reinstall.

    Do I really need to reinstall WordPress? That's a pain.
    Is there another easier fix?

    Shalom,
    Jonathan

  9. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    You should make the setup of the plugin. Go to Settings > Multisite Language Switcher and click then on Save if the settings fit your needs. Do this for the other blogs too.

  10. JonathanFokker
    Member
    Posted 2 years ago #

    @realloc

    I have done this offcourse, but still I will get the problem that I cannot update pages or posts.
    My language switcher in the header also gives the wrong URL. I will point to the same language and not to the other language.

    Any more ideas?

    Greetings,
    Jonathan

  11. mcchazza
    Member
    Posted 2 years ago #

    Jonathan
    I've just come through a similar issue. Not sure if the resolution is the same. In my case, as an absolute beginner with web page building, I found out how small details matter - I installed the .mo files to /wp-content/Languages instead of .../languages. Once I renamed the folder, it all worked beautifully.
    Hope that helps, good luck

    Adam

  12. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    @JonathanFokker Yes, I'm quite sure that you have not set the language in all of your blogs. Please have a look if you set the language in your Spanish blog too.

  13. JonathanFokker
    Member
    Posted 2 years ago #

    He Adam,

    Thanks, but I have the language directory well translated.

    I am trying to reinstall my whole multisite which is a pain.

    Shalom,
    Jonathan

  14. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    @JonathanFokker There is no need to reinstall the whole multisite.

  15. JonathanFokker
    Member
    Posted 2 years ago #

    He all,

    I got it to work today.
    Don't know what the problem was, I think it was a User problem or that I installed the Multi Language Switcher also in the Main site (not the language sites).

    Great plugin realloc. Really good.

    Some ideas for further optimization:
    1) Quick possibility to link the pages. Now I have to open each page, but just in one click would be great.
    2) A little bit more documentation on the custom flags and directory?

    Shalom,
    Jonathan

  16. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    @JonathanFokker Thanks for your feedback. I'll work on this ... ;)

  17. linkfr
    Member
    Posted 2 years ago #

    Hi everyone!

    I am afraid i got a little bit lost following this instructions: http://wordpress.org/extend/plugins/multisite-language-switcher/installation/

    - I have a multisite network with two independent sites.
    - I uploaded the whole multisite language switcher carpet into wp-content/plugins.
    - I've got several languages at plugins/languages, for example: msls-fr_FR.mo and .po
    - In the site dasboard, inside Settings, on the right, i can modify the multisite language switcher, through options such as Sort output by description, Exclude this blog from output, Text/HTML before the list, etc.

    But i cant find anywhere a "Site language" option...

    Any clues of what am i getting wrong?

    I also set to "fr" several fields in the other long settings page and installed the widget but nothing changes...

  18. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    You can find this in Setting > General Settings if you have some language-files of the WordPress-Installation in /wp-content/languages/ too.

  19. linkfr
    Member
    Posted 2 years ago #

    That's right, thanks, i just checked that out.

    Indeed such languages only appeared in the folder you tell me about after i installed another plugin - native dashboard - and its languages files.

    I just changed one of my sites to French and it works... Except for the posts information - it's still in English ("posted on" + the French date) while everything else appears in French.

    This is not nice as you may imagine even if it's only a detail. Should i uninstall and reinstall the plugin? Is that normal? Can it be avoided?

    Thanks a lot for your help!

  20. linkfr
    Member
    Posted 2 years ago #

    Oh, something else: I guess it's impossible to have the dashboard in English but the website displayed in French?

  21. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    If you see something like "posted on" and the French date you should control your theme if it uses the right format for translatable strings (something like _e or __ as function).

    If you use "Native Dashboard" you can have the dashboard in every language you want.

  22. linkfr
    Member
    Posted 2 years ago #

    Thanks, ok for the dashboard.

    But how can i "control my theme if it uses the right format for translatable strings (something like _e or __ as function)"?

    Could you please be so kind to tell me where to go, what to open, what to change?

  23. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    In /wp-content/themes/DIR_OF_YOUR_THEME/ you have a single.php (or at least a index.php) where you can look for such a string.

  24. linkfr
    Member
    Posted 2 years ago #

    Hi, thanks again for your reply!

    I just downloaded another theme, and i still have the same problem.

    I took a look into single.php and the word "function" doesnt even appear inside?

    Do you maybe know what i should add exactly and where?

    I've also got index.php by the way.

  25. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    Look for __ or _e and not for function ;)

  26. linkfr
    Member
    Posted 2 years ago #

    Ok, done, i've got a _e in one of the lines, you may take a look here:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    So then what? Should i add a piece of code? What? Where? I still find some words such as Categorized or Posted in English instead of French.

  27. Tatou 33
    Member
    Posted 2 years ago #

    Hi! I have installed wordpress and the multisite language switcher. I have a principal site (www.example.com) and added two new sites (www.example.com/es) and (www.example.com/fr) to create a spanish and french version. I have installed the language files from http://svn.automattic.com/wordpress-i18n/ in my wp-content -> plugins -> multisite-language-switcher -> languages. In the "general settings" of each site, I set the language as "en" for english, "es" for spanish and "fr" for french.

    WHAT I CAN DO: when I create a new page in any of the three sites, i see in the upper right corner the "multisite language switcher" where I could (as I suppose) make the link to any other page, i.e., the same page in the other language.

    PROBLEM: The options that appear both have the US-flag. Now, in any of the three sites, when I go to "settings -> multisite language switcher" to set my "multisite language switcher options", I can see that in fact my three sites are as follows: example.com/us, blogname fr/us and blogname es/us. So in fact, all three sites are on "us".

    QUESTION: what do I need to do to "tell" the network which site is in which language? or in other words: how can I get rid of the "us"?

    Thanks in advance for your help!

  28. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    OK, that's a lot ... ;)

    1. Move the language files to the folder "wp-content/languages/" ... if you installed a french WordPress version for example there are already files like fr_FR.mo and fr_FR.po in this folder.

    2. You must go to "Settings > Multisite Language Switcher" and save your configuration. In the newest version the plugin displays a message that you'll have to finish the setup until you have done this.

    3. Double check if your user (your login) is the owner (or and admin) of all these blogs. If not change this.

    4. In your case: Seems that you need a Domain Mapper -> http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    Hope this helps!

  29. Tatou 33
    Member
    Posted 2 years ago #

    Hi! thanks for your reply!

    1. ) Is it possible that the problem can be here: I have no folder "wp-content/languages/". In my wp-content folder I have "plugins", "themes", "upgrade" and "uploads". When I open the plugins folder, I have a folder "multisite-language-switcher", and there a folder "languages". This is where I installed the language files. There were indeed already some fr_FR.mo files (I do not exactly remember which files were there), which during the process of installing I overwrote (at least I suppose this is what I did ;o) ). I have wordpress 3.3.2 installed.

    2. ) What exactly do I have to fill in in "Settings > Multisite Language Switcher"? There are some options that I don't understand, can you guide me here?

    3. ) In "sites > edit > users" I am the only user and administrator, is this correct like this?

    Thanks again for your time!

  30. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    Yes the problem seems to be point one ... if you don't have a folder /languages/ in wp-content you must create one and then you have to copy the files from the svn.automattic.com server there. The plugin has its own language files. That's why it has its own language folder.

    It's no problem if you don't understand all of the options of the plugin. Maybe this will you: help https://github.com/lloc/Multisite-Language-Switcher/wiki

    Point 3 is correct.

    Cheers,
    Dennis.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic