WordPress theme with two languages - php

If i have two button in front-end called English and Arabic, what is the best practice to make the website displayed by the language user chooses.

Personally I'd stay away from a heavy plugin like wpml which creates duplicate posts and run slow queries. The plus side is really so you can use the plugin with other WPML compatible plugins (there are some popular plugins compatible with it) and translate taxonomies and syncing metadata in translation posts.
If the translation is minimal on some content and you can code yourself, I'd suggest making your custom solutions by maybe storing data as metadata associated with post and display according to the language setting.

Related

Use Loco translate for making Wordpress Multi-Langual

Recently i needed to translate a big website. I translated the Loco PO files with PO Editor.
Then i added it, and now i can have either the original language or the new one at a time.
Loco translate do not provide a solution for makeing a website multilangual.
But, on the Loco Translate official website it tells:
So there is a way to implement it with some coding.
Is there a ready snippet, or a proven working method to make Wordpress Multilangual with Loco Translate and some code snippet?
Thanks for the answers!
If you take a look at the plugin description of you Loco Translate:
Built-in translation editor within WordPress admin
Create and update language files directly in your theme or plugin
Extraction of translatable strings from your source code
https://wordpress.org/plugins/loco-translate/
Loco Translate is a really good plugin if you want to translate strings inside of your theme files or inside of plugins. For this use-case it works perfectly.
If you want to translate the content of your website, so the actual posts and pages with their text and images, you need something different. You do not want to translate strings in the source code, but the content of your pages/posts.
A free solution which I often use is Polylang. It is very easy and also supports custom post types, taxonomies, media, tags and much more, which you can activate or deactivate for translation. You can translate your content to as many languages as you like, a language switcher also is included. Content from one language can be automatically copied over so translating is fast and easy to manage. Really a recommendation from my side.
https://wordpress.org/plugins/polylang/

Correct way to have a multilangiage blog with article translation

I have my non-wordpress blog in English and now I need to have the same blog in French and Spanish. I not only need menu buttons, breadcrumbs, etc but also the actual content of the articles too. So when users choose "Spanish" from the top bar, they will see my blog in Spanish, including the articles translated.
I was thinking about using .pot files. But articles body contents are generally long and I am not even sure if I could accomplish this with .pot
Make a subdomain/subdirectory for each new language. But if in the future I decide to support other languages, it will be crazy to maintain. Ie, if I need to change the logo I would have to change the logo in all subdirectory/subdomain websites.
What is the best way to accomplish multilanguage site?
Thank you
You have properly outlined main problems raising in the process of creating and maintaining multilingual website. All of this problems are solved by WPML - Wordpress Multilingual Plugin. It is most popular, very flexible and powerful system for translating websites.

Wordpress Multilingual absolute link

I am working on a WordPress website, and need to add a multilingual plugin.
Here is my problem: I don't want any automatic translation, but flags that lead to absolute links, as every language will be on a different domain name.
I can't find any existing plugin that is doing this, and I can't make my own one as I don't have enough time and my PHP skills are low.
Do you think about a plugin I could use for this? Or a plugin I could download and modify?
Thank you.
WPML allows you to use multiple domains for multiple languages. It is very reliable and offers many other possibilities.
They have a tutorial on their page: Multilingual Site Network with Domain Mapping.

Wordpress Video Portal

my challenge is to built a video portal, based on wordpress (blog already started).
so in the backend there must be a option to add, tag, descripe videos and in frontend the videos must have a comment function, must be searchable and so on.
wordpress gives already a large amout of functionallity and i want to use this, comments for example, but also categorisation and tagging.
what is the best practise to built such a "plugin" ?
where to start? what to use?
custom tables and built everything by myself or can i use the blog functionallity to advantage?
hopefully everything is clear, comment if not ;)
Take a look at VideoPress.

Setup multi languages wordpress

I need to setup a blog using wordpress engine but i need it support multi languages (3 languages), currently i am thinking of using custom field to identify the language of current post though i knew thats not a best practices, does anyone has better suggestions?
I've tested 2 plugins that both looked very promising: qTranslate and Gengo
qTranslate works by adding inputs for all used languages for each post, Gengo used separate posts and links them in a "post Y is a translation of post X" way, which I preferred much (because it allowed me to not translate everything) and it worked fine for me.
I have used the xlanguage plugin and I am happy with it.
xlanguage site
I fi i remember well, wordpress uses a gettext "customization" library to translate itself.
I think you can make some options based on a session variable, about the translation files you're going to read.
Try using plugin wordpress WPML.

Categories