Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wecodemore/wcm_lang_switch
WordPress plugin to switch language on a per use base
https://github.com/wecodemore/wcm_lang_switch
admin-toolbar language wordpress wordpress-plugin
Last synced: about 1 month ago
JSON representation
WordPress plugin to switch language on a per use base
- Host: GitHub
- URL: https://github.com/wecodemore/wcm_lang_switch
- Owner: wecodemore
- Created: 2013-01-09T02:29:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2020-07-11T23:39:46.000Z (over 4 years ago)
- Last Synced: 2024-04-26T19:03:55.437Z (8 months ago)
- Topics: admin-toolbar, language, wordpress, wordpress-plugin
- Language: PHP
- Size: 1.83 MB
- Stars: 21
- Watchers: 9
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WCM User Language Switcher #
**Contributors:** [Stephen Harris](https://github.com/stephenharris), [Franz Josef Kaiser](https://github.com/franz-josef-kaiser)
**Tags:** Language, switcher, localisation
**Tested up to:** 4.1
**Stable tag:** 1.8.1
**Requires at least:** 3.6.1
**License:** GPL3
**License URI:** http://www.gnu.org/licenses/gpl-3.0.htmlAdds a button to the admin toolbar. This buttons allows users to seamlessly switch between available languages.
## Description ##
WCM Language Switcher adds a button to the admin toolbar that allows users to seamlessly switch between available languages.
WeCodeMore (WCM) is your label for high quality WordPress code from renowned authors.
If you want to get updates, just follow us on…
* [our GitHub repository](https://github.com/wecodemore)
## Installation ##
Extract the zip file and just drop the contents in the `~/wp-content/plugins/` directory of your WordPress installation and then activate the Plugin from Plugins page.
It scans the language directory to build the list of available languages. To add a language, simple [download the appropriate mo file](http://codex.wordpress.org/WordPress_in_Your_Language) and add to your WordPress `languages` folder.
This plugin was originally built as a means of plugin and theme developers to test translations of their plugins or themes.
## Frequently Asked Questions ##
### Filters ###
If you want to extend the list of available languages, then please use the provided filter. Here's an example (mu)plugin:
```php
wcm_get_user_locale() from public API.### 1.7.1 ###
* PHP 5.2 work-around for json_last_error()
### 1.7 ###
* Changes to feat. request/enhancement #18: Now shows the native string in the toolbar menu
* Removes the current language as menu item
* Adds the international/English language string + ISEO 639-2 code as HTML title attr. to the items.
* Switched from$wp_admin_bar->add_menu()
to the newer API methodadd_node()
.### 1.6.6 ###
* Improved dev tools. Now also counts the number of available ISO 639-2 language codes.
### 1.6.5 ###
* Deprecated
wcm_get_user_locale()
(replaced withwcm_get_user_lang()
and tell users about it.
* Improved code readability onformat_code_lang()
### 1.6.4 ###
* Consistent naming according to GitHub issue #21
* Devlopers: The filter names changed as well as the public API function.### 1.6.3 ###
* Start earlier on
plugins_loaded
hook to let other plugins jump in with the default priority.### 1.6.2 ###
* phpDocBlock fixes
* fixed references to static values so PhpStorm can handle them
* Slightly faster checks against NULL
* fixesE_STRICT
error inreset()
insideformat_lang_code()
. Props toscho.### 1.6 ###
* Dev Tools extended and running stable. Now updating from the remote source works perfectly.
* Better file organisation. Moved JSON files to separate folder.
* Fixed (due to refactoring) broken JSON compress dev tools.### 1.5 ###
* Added local/native JSON strings data file.
* Extended the dev tools parser to include the native data for the JSON files that are used for the UI.### 1.4 ###
* Added remote location to fetch a complete list of ISO 639-x strings from.
* Added a parser to the dev tools.### 1.3 ###
* Added dev tools
### 1.2 ###
* Bug fix: Now has right language string.
### 1.1 ###
* Initial Version in the official repo.
* Now works with the ISO 639-2, which adds support for nearly every language.### 1.0 ###
* Bug fixes
* Speed improvements. Props Thomas "toscho" Scholz### 0.9 ###
* Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.
### 0.9 ###
* Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.
### 0.9 ###
* Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.
* Switched license to GPL3### 0.8 ###
* Reworked plugin code to a more readable code styling and maximum line length (GitHub page width).
### 0.7 ###
* Bug fixes
### 0.6. ###
* Moved from a GitHub Gist to a GitHub.