-
Notifications
You must be signed in to change notification settings - Fork 4
/
readme.txt
182 lines (113 loc) · 4.94 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
=== WCM User Language Switcher ===
Contributors: stephenharris, F J Kaiser
Tags: Language, switcher, localisation
Tested up to: 4.1
Stable tag: 1.8.0
Requires at least: 3.6.1
License: GPL3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Adds 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 <code>~/wp-content/plugins/</code> 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 "WordPress .mo file download") and add to your WordPress language 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:
<pre>
<?php
/* Plugin Name: (WCM) Add additional languages */
add_filter( 'wcm_get_langs', 'wcm_add_languages' );
function wcm_add_languages( $languages )
{
return array_merge( $languages, array(
'de_DE', // German
'es_ES', // Spanish
'ja', // Japanese
) );
}
</pre>
== Screenshots ==
1. The plugin in action in the admin bar.
== Changelog ==
= 1.8.1 =
* Add github action to deploy plugin
= 1.8.0 =
* Fix hook for additional item inside the Admin Bar, #37
* Update screenshot, #25
* Test in Multisite, Network activation, #27
* Set code style in each line for PSR1-2
* See also on front-end, if Admin Bar is active fir the user, #32
= 1.7.6 =
* Fixes admin bar menu item on mobile
* Adds dashicon to admin bar
* Fixes some styling issues
= 1.7.5 =
* Removed legacy method.
* Removed empty lines to shorten file.
= 1.7.4 =
* Fixed wrong assumption about default language.
= 1.7.3 =
* Added support for composer.
= 1.7.2 =
* Removed deprecated <code>wcm_get_user_locale()</code> 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 <code>$wp_admin_bar->add_menu()</code> to the newer API method <code>add_node()</code>.
= 1.6.6 =
* Improved dev tools. Now also counts the number of available ISO 639-2 language codes.
= 1.6.5 =
* Deprecated <code>wcm_get_user_locale()</code> (replaced with <code>wcm_get_user_lang()</code> and tell users about it.
* Improved code readability on <code>format_code_lang()</code>
= 1.6.4 =
* Consistent naming according to GitHub issue #21
* <strong>Devlopers:</strong> The filter names changed as well as the public API function.
= 1.6.3 =
* Start earlier on <code>plugins_loaded</code> 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
* fixes <code>E_STRICT</code> error in <code>reset()</code> inside <code>format_lang_code()</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.