WordPress 2.5.1 - multi-lingual admin login (beta download)
codestyling | 05. June 2008 | 23:52
As already shown at older post there is a way permitting user to login and use the Browser administration area in different languages. You can choose the appropriated language at login page and the administration shows up translated at this selected language. This switching has been implemented as WordPress plugin. The version published is only an extraction out of the final release. This reduced plugin beta provides only the backend language switch during logon. If you want change it later, you will have to logoff and logon again.
Requirements
Running the plugin successful with WordPress you have to meet following requirements:
- WordPress installation of version 2.5 / 2.5.1
- Languagefiles (*.mo) of those which have to be supported
- Blog must use UFT-8 charset (normally the case)
The plugin does not store any data at your blogs database in this version and also no additional database tables will be created. It works “out of the box” after activation without any configuration. Thatswhy it doesn’t have a configuration page yet, this will first occure at final release package.
Features
The ultimate standard language is english, if the plugin is not able to deal with the language in case of missing *.mo file or in case of currently unsupported languages (like Navajo).
The language preselected for 1st occurance of login page after activation depends on your browser. Because browser send the prefered language profile of user, the 1st impression is driven by that analysis. If the browser send more than one language with quality levels, the plugin evaluates them and chooses the best possible match. In case of all languages are impossible, the default english will be used instead.
To provide several languages for your backend you may only upload the releated *.mo files in you WordPress folder /wp-content/languages and the will be immediately present at login page. For you interests i have build an addtional download packed containing chineese, hebrew, and french so you can quick test it.
The plugin is also aware the fact, that some languages required a right-to-left writing direction. This has been supported correctly not only for the backend itself but also the login page too. You can test it using the hebrew language available at additional download package.
An other nice feature is the possiblility to provide your own styleheets used at login page. You can adapt the login at you company layout or the theme you are using. The requirement therefore are 2 new file in your current, active theme path where you defined the CSS rules:
- login.css
- login-rtl.css
The plugin first checks the presence of this files. If they are missing, nothing will be included into login page header. The file login-rtl.css will only be additional included, if the writing direction right-to-left has been detected for requested language. Because several browser make mistakes at styling in rtl mode, this correction stylesheet may be needed to compensate this errors.
The last recently used language of successful login will be stored by cookie. This overrides the browser detection at next login and your last logon used language will be preselected.
Finally i have to say, this version is a beta version. I have tested all as far as i could and did not find any issues. But this doesn’t meen, that there are none included.
Feedback would be appreciated but currently only possible by mail (Imprint). The final version can be configured much more dedicated, user can have there personal settings and also the frontend will be possible in different languages.
But anyway, if have to test a lot of code, so i made this extraction version first.
WP 2.5+ Beta Plugin: wp-mladmin-1.0.0.0-beta.zip
WP 2.5+ Language Files: wp-251-languages.zip
Installation
The language files have to be uploaded beside any existing language files like de_DE.mo at existing folder /wp-content/languages . After upload the languages should be available.
The plugin itself have to be uploaded into the official plugin folder /wp-content/plugins and unzipped. Please respect the given folder structure of plugin package too. You should find the plugin afterwards here /wp-content/plugins/wp-mladmin
Finally just login as normal and activate the plugin. After logoff you will have immediatly the language selection present at login page.
Appendix
If you change at your file wp-config.php the constant WPLANG as example into value ‘zh_CN‘ , your public blog will be labeled in chineese for standard texts like more Links, categorie, search aso. But nevertheless you will be able to choose the language for you backend freely during login and the backend will show up at you selected language instead of configurated. This config language only defines the public part from now on.






Kalle Kniivilä
01.01.2009 | 22:01I’d like to be able to change the interface language for the blog itself, or rather, to let the users choose the interface language they prefer. Can your plugin be modified to do this?
reply »
codestyling
03.01.2009 | 00:55Please have a look at this sneak peak at the end: WordPress Localization - Features and future Development.
You will see, that there is comming such language switching for backend only inside next version.
reply »
Maja
09.02.2009 | 16:03Great plugin! Thanks for developing it. I’ll be using it on my next project and it works as described above.
reply »
Essay Writing
23.03.2009 | 23:40Excellent essay content! You have written very useful tips!
reply »
Essaylandia
19.06.2009 | 12:25I rarely do not comment on blogs but yours I had to stop and say Great article!!
reply »