{"id":21557,"date":"2013-01-18T14:36:54","date_gmt":"2013-01-18T14:36:54","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wcm-user-language-switcher\/"},"modified":"2020-07-11T23:36:29","modified_gmt":"2020-07-11T23:36:29","slug":"wcm-user-language-switcher","status":"publish","type":"plugin","link":"https:\/\/sr.wordpress.org\/plugins\/wcm-user-language-switcher\/","author":8483444,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.8.1","stable_tag":"trunk","tested":"4.1.42","requires":"3.6.1","requires_php":"","requires_plugins":"","header_name":"User Language Switcher","header_author":"Stephen Harris","header_description":"","assets_banners_color":"ececec","last_updated":"2020-07-11 23:36:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/wecodemore\/wcm_lang_switch","header_author_uri":"https:\/\/plus.google.com\/b\/109907580576615571040\/109907580576615571040\/posts","rating":5,"author_block_rating":0,"active_installs":100,"downloads":14156,"num_ratings":8,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"8"},"assets_icons":[],"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"2339183","resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"2339183","resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.6.1","1.7.1","1.7.5","1.8.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2339183","resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"The plugin in action in the admin bar."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1385,2342,1140],"plugin_category":[],"plugin_contributors":[77871,78362],"plugin_business_model":[],"class_list":["post-21557","plugin","type-plugin","status-publish","hentry","plugin_tags-language","plugin_tags-localisation","plugin_tags-switcher","plugin_contributors-f-j-kaiser","plugin_contributors-stephenharris","plugin_committers-f-j-kaiser","plugin_committers-jenkinspress","plugin_committers-stephenharris"],"banners":{"banner":"https:\/\/ps.w.org\/wcm-user-language-switcher\/assets\/banner-772x250.png?rev=2339183","banner_2x":"https:\/\/ps.w.org\/wcm-user-language-switcher\/assets\/banner-1544x500.png?rev=2339183","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wcm-user-language-switcher_ececec.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wcm-user-language-switcher\/assets\/screenshot-1.png?rev=2339183","caption":"The plugin in action in the admin bar."}],"raw_content":"<!--section=description-->\n<p>WCM Language Switcher adds a button to the admin toolbar that allows users to seamlessly switch between available languages.<\/p>\n\n<p>WeCodeMore (WCM) is your label for high quality WordPress code from renowned authors.<\/p>\n\n<p>If you want to get updates, just follow us on\u2026<\/p>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/wecodemore\">our GitHub repository<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>Extract the zip file and just drop the contents in the <code>~\/wp-content\/plugins\/<\/code> directory of your WordPress installation and then activate the Plugin from Plugins page.<\/p>\n\n<p>It scans the language directory to build the list of available languages. To add a language, simple <a href=\"http:\/\/codex.wordpress.org\/WordPress_in_Your_Language\" title=\"WordPress .mo file download\">download the appropriate mo file<\/a> and add to your WordPress language folder.<\/p>\n\n<p>This plugin was originally built as a means of plugin and theme developers to test translations of their plugins or themes.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt><h3>Filters<\/h3><\/dt>\n<dd><p>If you want to extend the list of available languages, then please use the provided filter. Here's an example (mu)plugin:<\/p>\n\n<pre>\n    &lt;?php\n    \/* Plugin Name: (WCM) Add additional languages *\/\n    add_filter( &#039;wcm_get_langs&#039;, &#039;wcm_add_languages&#039; );\n    function wcm_add_languages( $languages )\n    {\n        return array_merge( $languages, array(\n            &#039;de_DE&#039;, \/\/ German\n            &#039;es_ES&#039;, \/\/ Spanish\n            &#039;ja&#039;,    \/\/ Japanese\n        ) );\n    }\n<\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.8.0<\/h4>\n\n<ul>\n<li>Fix hook for additional item inside the Admin Bar, #37<\/li>\n<li>Update screenshot, #25<\/li>\n<li>Test in Multisite, Network activation, #27<\/li>\n<li>Set code style in each line for PSR1-2<\/li>\n<li>See also on front-end, if Admin Bar is active fir the user, #32<\/li>\n<\/ul>\n\n<h4>1.7.6<\/h4>\n\n<ul>\n<li>Fixes admin bar menu item on mobile<\/li>\n<li>Adds dashicon to admin bar<\/li>\n<li>Fixes some styling issues<\/li>\n<\/ul>\n\n<h4>1.7.5<\/h4>\n\n<ul>\n<li>Removed legacy method.<\/li>\n<li>Removed empty lines to shorten file.<\/li>\n<\/ul>\n\n<h4>1.7.4<\/h4>\n\n<ul>\n<li>Fixed wrong assumption about default language.<\/li>\n<\/ul>\n\n<h4>1.7.3<\/h4>\n\n<ul>\n<li>Added support for composer.<\/li>\n<\/ul>\n\n<h4>1.7.2<\/h4>\n\n<ul>\n<li>Removed deprecated <code>wcm_get_user_locale()<\/code> from public API.<\/li>\n<\/ul>\n\n<h4>1.7.1<\/h4>\n\n<p>PHP 5.2 work-around for json_last_error()<\/p>\n\n<h4>1.7<\/h4>\n\n<ul>\n<li>Changes to feat. request\/enhancement #18: Now shows the native string in the toolbar menu<\/li>\n<li>Removes the current language as menu item<\/li>\n<li>Adds the international\/English language string + ISEO 639-2 code as HTML title attr. to the items.<\/li>\n<li>Switched from <code>$wp_admin_bar-&gt;add_menu()<\/code> to the newer API method <code>add_node()<\/code>.<\/li>\n<\/ul>\n\n<h4>1.6.6<\/h4>\n\n<ul>\n<li>Improved dev tools. Now also counts the number of available ISO 639-2 language codes.<\/li>\n<\/ul>\n\n<h4>1.6.5<\/h4>\n\n<ul>\n<li>Deprecated <code>wcm_get_user_locale()<\/code> (replaced with <code>wcm_get_user_lang()<\/code> and tell users about it.<\/li>\n<li>Improved code readability on <code>format_code_lang()<\/code><\/li>\n<\/ul>\n\n<h4>1.6.4<\/h4>\n\n<ul>\n<li>Consistent naming according to GitHub issue #21<\/li>\n<li><strong>Devlopers:<\/strong> The filter names changed as well as the public API function.<\/li>\n<\/ul>\n\n<h4>1.6.3<\/h4>\n\n<ul>\n<li>Start earlier on <code>plugins_loaded<\/code> hook to let other plugins jump in with the default priority.<\/li>\n<\/ul>\n\n<h4>1.6.2<\/h4>\n\n<ul>\n<li>phpDocBlock fixes<\/li>\n<li>fixed references to static values so PhpStorm can handle them<\/li>\n<li>Slightly faster checks against NULL<\/li>\n<li>fixes <code>E_STRICT<\/code> error in <code>reset()<\/code> inside <code>format_lang_code()<\/code>. Props toscho.<\/li>\n<\/ul>\n\n<h4>1.6<\/h4>\n\n<ul>\n<li>Dev Tools extended and running stable. Now updating from the remote source works perfectly.<\/li>\n<li>Better file organisation. Moved JSON files to separate folder.<\/li>\n<li>Fixed (due to refactoring) broken JSON compress dev tools.<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Added local\/native JSON strings data file.<\/li>\n<li>Extended the dev tools parser to include the native data for the JSON files that are used for the UI.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Added remote location to fetch a complete list of ISO 639-x strings from.<\/li>\n<li>Added a parser to the dev tools.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Added dev tools<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Bug fix: Now has right language string.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Initial Version in the official repo.<\/li>\n<li>Now works with the ISO 639-2, which adds support for nearly every language.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Bug fixes<\/li>\n<li>Speed improvements. Props Thomas \"toscho\" Scholz<\/li>\n<\/ul>\n\n<h4>0.9<\/h4>\n\n<ul>\n<li>Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.<\/li>\n<\/ul>\n\n<h4>0.9<\/h4>\n\n<ul>\n<li>Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.<\/li>\n<\/ul>\n\n<h4>0.9<\/h4>\n\n<ul>\n<li>Moved to JSON file. Works with compressed file. Has an uncompressed version for live sites.<\/li>\n<li>Switched license to GPL3<\/li>\n<\/ul>\n\n<h4>0.8<\/h4>\n\n<ul>\n<li>Reworked plugin code to a more readable code styling and maximum line length (GitHub page width).<\/li>\n<\/ul>\n\n<h4>0.7<\/h4>\n\n<ul>\n<li>Bug fixes<\/li>\n<\/ul>\n\n<h4>0.6.<\/h4>\n\n<ul>\n<li>Moved from a GitHub Gist to a GitHub.<\/li>\n<\/ul>","raw_excerpt":"Adds a button to the admin toolbar. This buttons allows users to seamlessly switch between available languages.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/21557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=21557"}],"author":[{"embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/stephenh1988"}],"wp:attachment":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=21557"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=21557"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=21557"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=21557"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=21557"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=21557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}