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/
Related
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.
I have created a .po file to translate the custom template text. But this isn't what I want to achieve. I only want Wordpress to translate the texts when it's on the matching language code .com/en/... Now it translates everything on the same URL which means I can only see one language and for example not visit the Dutch version by going to .com/nl/..
Is it possible to add language code in the URL which translates to matching language?
Hopefully this makes sense, if not I'll explain better.
To translate a Wordpress Website, you may need a plugin that make this. As much as you add a "/ nl", if you do not have a plugin that translates the whole web and you modify the language of wordpress, the wordpress itself will not know that you have changed the language and will always show the same ".po".
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.
Now I am Working on a Wordpress Project. and my problem is in my project site must work in two language Like this If i select one of this language site Must Change the language as i select please help me to find a solution :'( (I wont need a plugin because its not change it proper )
You say you don't need a plugin, but WPML is cheap and the best at doing this, by far. I have used it personally doing client work and it is the best multi-language plugin for WordPress I've used.
I am using gtranslate plugin only and it is working very well. It has Translations between 58 languages with the support of flags.
In the settings panel of this plugin, put translation "on fly". Then it will not reload the page for translation.
Just Try it. Cheers!!!
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.