WordPress local language plug-in Codestyling Localization tutorial

Source: Internet
Author: User

Sometimes theme development may meet multi-language support requirements, but you are not necessarily familiar with the other language (such as German), so this part is usually handed over to the customer for translation. But how is it more convenient? You cannot change the language pack of the theme on your own. Generally, the developed theme must be used directly by the customer, rather than modifying the source code.

WordPress's powerful plug-ins certainly have such tools. Today we recommend commonly used plug-ins for you:

[Plug-in name:]

Codestyling Localization

[Download:]

Https://wordpress.org/plugins/codestyling-localization/

[General usage:]

When writing the topic code, write the text that needs to be translated in the following two ways (anyone who knows the subject in multiple languages will know it). The following uses ooxx text to describe it.

<? Php _ e ('ooxx', 'themename');?>

In php

<? Php
Echo _ ('ooxx', 'themename ').'?! ';
?>

(Note: themename is textdomain and is casual. Generally, there are many themename names.

The topic functions. php is added with textdomain and definition supported by multiple languages:

Load_theme_textdomain ('themename', get_template_directory ());

(Note: Use the topic directory. The plug-in is the topic directory by default.

After installing the plug-in, click Tools> Localization in the WP background and click the Themes directory to list all topics that support multiple languages. Then, you can click add support language, after scanning, you can save the words scanned as xx_XX.pot and the language you created. mo. po files (for example, zh_CN.mo and zh_CN.po in Chinese) can be translated directly here by clicking the created language file.

(Note: Of course, this plug-in not only supports themes, but also supports various texts in WordPress.

[PS]

Some friends who make multi-language support topics do not know how to generate. pot files/directly use. mo. po. In fact, you can directly use this plug-in to generate the. mo and. po files, and then use the Poedit software to edit them. Many of the tools found on the Internet are linux/server tools, which are not very convenient.

--------

It is rare to update it. However, the downloaded films, TV series, and cartoons have not been viewed yet. I immediately went to a video to watch the release. I have been busy with it for a long time.

--------

In other words, Android L is indeed good, that is, it is too power-consuming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.