Skip to content

Commit

Permalink
FAQs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Dec 28, 2018
1 parent 0da110d commit dcf4098
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ _Please keep in mind that the version of the Multisite Language Switcher at GitH

Run `composer install --no-dev` if you plan to use the repository anyways.

**Download the [latest stable from the WordPress Plugin Directory](http://downloads.wordpress.org/plugin/multisite-language-switcher.zip).**
**Download the [latest stable from the WordPress Plugin Directory](http://downloads.wordpress.org/plugin/multisite-language-switcher.zip) and please, don't forget to give this plugin a star.**

[![Build Status](https://travis-ci.org/lloc/Multisite-Language-Switcher.svg?branch=master)](https://travis-ci.org/lloc/Multisite-Language-Switcher)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/lloc/Multisite-Language-Switcher/badges/quality-score.png?s=a2e5dbac2690bbd427f2d48b84473482e7e24fdb)](https://scrutinizer-ci.com/g/lloc/Multisite-Language-Switcher/)
Expand Down
6 changes: 4 additions & 2 deletions docs/appendices/faq.md
Expand Up @@ -6,7 +6,7 @@ You might read first [WordPress in your language](http://codex.wordpress.org/Wor

## But I'd like the interface to stay in English. ##

You can choose the language of every website and the dashboard in the settings page of the plugin.
You can choose the language of the dashboard in the settings of your user profile.

## Do I really need a multisite? ##

Expand All @@ -28,8 +28,10 @@ You could try the plugin [Network Shared Media](http://wordpress.org/plugins/net

## Is there a function I can call to get the language of the page the user is currently viewing? ##

Yes, you can get the language like that
Yes, you should use the WordPress API function **get_locale()** but you could also use code like that

use lloc\Msls\MslsBlogCollection;

$blog = MslsBlogCollection::instance()->get_current_blog();
$language = $blog->get_language();

Expand Down
10 changes: 7 additions & 3 deletions readme.txt
Expand Up @@ -22,6 +22,8 @@ The Multisite Language Switcher enables you to manage translations of posts, pag

The plugin uses flag-icons from [FamFamFam](http://famfamfam.com). Thanks to Mark James for his great work. In addition I would like to thank [Jürgen Mayer](
http://kreativewerk.com/) for creating the plugin's banner.

Please, don't forget to [rate this plugin](https://wordpress.org/support/plugin/multisite-language-switcher/reviews/)! :-)

== Installation ==

Expand Down Expand Up @@ -49,7 +51,7 @@ You might read first [WordPress in your language](http://codex.wordpress.org/Wor

= But I'd like the interface to stay in English. =

You can choose the language of every website and the dashboard in the settings page of the plugin.
You can choose the language of the dashboard in the settings of your user profile.

= Do I really need a multisite? =

Expand All @@ -75,9 +77,11 @@ You could try the plugin [Network Shared Media](http://wordpress.org/plugins/net

= Is there a function I can call to get the language of the page the user is currently viewing? =

Yes, you can get the language like that
Yes, you should use the WordPress API function `get_locale()` but you could also use code like that

`use lloc\Msls\MslsBlogCollection;

`$blog = MslsBlogCollection::instance()->get_current_blog();
$blog = MslsBlogCollection::instance()->get_current_blog();
$language = $blog->get_language();`

= How can I move from WPML to MSLS? =
Expand Down

0 comments on commit dcf4098

Please sign in to comment.