New Features in WordPress 4.0
September 9, 2014
As we all know, WordPress is the most preferred platform for creating blogs. Every new release of WordPress versions comes with new features that make blog creation an easier process.
What we will discuss is about the latest feature of WordPress 4.0. Yes, recently a new feature is added to this current WordPress version. This feature is Language Chooser. Now, it becomes easy to use WordPress in n number of languages with this feature and any one can select the language that is easily understood.
A WordPress user just needs to select the language and WordPress will do the rest things including the installation process as. Here are some functions that will make this feature easy to use, some are newly introduced and some existing features are updated.
A list of these functions is given below:
- translations_api(): This function relies on plug ins API or themes API function and generates transalations from WordPress Translation API. The first command $type must be either core, a theme or a plugin . For additional arguments, $args command is used.
Let’s understand this with an example:
$args [version], this command applies to all types. An attribute “slug” must be set to different theme and plug in types. - wp_get_available_translations(): Another function used to get multiple translations for is wp_get_available_ translations. This is a wrapper for translations_api and provides basic translations for the latest WordPress version that you have installed. The API result is available for 3 hours.
When the language button is selected and Continue is clicked, the selected language pack is downloaded by the WordPress in the background. This is done with a function called wp_download_language_pack() with the support of Automatic_Upgrader_Skin & Language Pack Upgrader.
Translations are installed very soon so it is necessary to improve the existing “load_default_textdomain() functions. It supports an optional $locale parameter to constantly switch among various transactions.
- WPLANG Option: This option is set in single sites and is populated on upgrade that is based on the value of WPLANG constant which is now disfavoured. This new function wp_dropdown_languages() has taken the place of mu_dropdown_languages() that have many issues such as no support to the variants of the same language. ( like English UK, English USA) . The new drop down menu has lots of language translations with translation API.
Other Translation updates:
In the previous WordPress version 3.7, Language Pack Upgrader was the new feature introduced for the first time. Using this feature, unparalleled translation updates were made to run once a theme or plug in was installed or upgraded. Now, why these updates are required?
The main purpose is to get up to date translations for the theme or plug in you have installed. All out dated translations are updated to the new ones to stretch the fact that you have a file system connection.
In this WordPress version 4.0, asynchronous updates are unavailable and these can be manually disabled using this function async_update_translation.
Take Away:
We strive hard to keep our visitors updated with the current updates of the IT sector and our today’s blog, we believe has provided an in depth information about the new feature of newly released WordPress version. In order to get familiar with this current version, you can get in touch with our WordPress development professionals at Softqube Technologies.
Share on