How can we manually create multilingual WordPress website without using Polylang plugin or Google Translator?

WordPress




WordPress has some very simple i18n functions that can spit out manuals translations of anything into the user’s local language. i18n is a programming acronym for Internationalization and localization. That’s 18 letters between the “i” and “n”.

Specifically,

__() and _e() [note, that’s two underscores “__” and one underscore “_”]

Here is the reference in the codex:

I18n for WordPress Developers

Basically, WordPress has a tremendous i18n system that scans all the PHP files in the request BEFORE there are sent to the PHP engine. Translations are stored in web standard .po and .pot files, and are rendered based on the language set in the browser.

Now for content, you don’t need to re-invent the wheel as there are already plenty of good i18n plugins to choose from.

Read John Dee's answer to How can we manually create multilingual WordPress website without using Polylang plugin or Google Translator? on Quora

Leave a Reply

Your email address will not be published. Required fields are marked *