WPML is definitely the most complete solution out there, offering extensions for almost anything, including translating template strings. I use it for most client pages that need to be multilingual.
However, if it's for a simple personal blog and you don't need any crazy functionality, take a look at qTranslate-x. I use that for a small blog I'm setting up and I really like the simplicity of having both languages in the same post, as compared to seperate posts in WPML.
WP devs earn by volume, not per project. Drupal has what many call well-designed and structured design (on the plus side) as well as its inflexibilities (on the negative side) that make clients pay a lot more to Drupal devs than WP devs. Here is a relevant article regarding this topic.
WPML is pretty much the standard for multilingual sites, but you still have to put the content in for each language. There no real way around that besides hoping Google Translate works.
There is a premium plugin called WPML that handles translation beautifully. You can set up different languages for posts/pages/etc, and configure different ways of loading content in a different language - by domain, URL segment, etc:
You will obviously need to get translated content from somewhere, but WPML can help you with this if you don't have a translator on staff or on contract.
If you want to translate other parts of WordPress, including any language that is hardcoded into your theme, you will first need to internationalize it to prepare it for localization (translation):
https://developer.wordpress.org/themes/functionality/internationalization/
Then you will need to localize it (translate it) to the language of your choice, so that the content will be automatically displayed in the user's language for any languages you support:
https://developer.wordpress.org/themes/functionality/localization/
Good luck!
> Separate sites will require you to do everything a second time. And then again when you want to add a new language.
No it doesn't. Assuming you are doing it correctly you can have multiple domains all pointing to the same server and server up different content. Many user and even google tends to give preference to domains that they are familiar with.
https://wpml.org/2016/04/use-wpml-different-domains-per-language/
WPML is the best translation out there. Almost Human Level translations. It does a great job even translating categories and pages: >https://wpml.org/
qTranslate is also good, but I feel it a little bit more intrusive.
https://wpml.org/ is what I usually recommend / use. Also, you might want to consider using multisite for this build. This is especially helpful if you're going to be serving the second language on a unique URL/domain. I would argue this is best from an SEO perspective. Good luck!
Plugins like Polylang and WPML are mainly used to translate the site content for visitors to the site.
load_textdomain
is used to translate the admin interface for a theme/plugin. So if someone selects "Japanese" for their site language in the backend all the controls and menu items in the admin dashboard will be translated to Japanese.
If your theme/plugin has a Japanese translation available its text will also be translated.
There are plugins that help with translating your theme/plugin as well such as Loco Translate.
load_textdomain
is one piece of Internationalizing/Localizing your themes/plugins for use in multiple languages. A demo of how the code might look can be found here: https://www.ractoon.com/2016/11/translating-wordpress-themes-plugins/
I believe you have 3 options.
1) use google translate to auto translate on the fly.
2) use WPML plugin https://wpml.org
3) create a duplicate of the website on a subdomain and have it all in spanish.
It's definitely one way to do it, but imo it's usually easier to use a translation plugin such as Polylang Pro or WPML both of which have support for ACF.
The recipe is in the link you posted initially; you just want to replace 'Text' with `esc_html__( 'Text', 'my-domain' )`. Since you're asking these questions, it may not be obvious: the 'my-domain' bit there is your theme's text domain
You can use WEGLOT.COM to translate your full website automatically, just need to install a plugin and create an account on WEGLOT.COM, if you want to use your own translations, you need WPML.ORG which is not free. Anything is impossilbe!
Usually plugins are third-party; A lot of plugins are free, but some do require some kind of purchase. I have never worked on a multilingual site but I know of a couple popular plugins for that:
WPML helps you translate content manually or automatically. The ways that it allows you to translate content are:
TranslatePress default setting is manual translation. But you can enable automatic translation using Google Translate in plugin settings. You just need a Google Translate API key to access this function. Unfortunately, we all know that Google translate feature is nowhere near good and will require many corrections.
Hi there, With WPML anything that is a system or core and not translated automatically using WordPress .po; .mo files you can translate via string translations: https://wpml.org/documentation/getting-started-guide/string-translation/ Ive used WMPL; Polylang; Loco Translate and several others but regardless what other people say the WMPL would be my #1
The WPML is the best you can get for what you need. With WPML you can translate all and any aspect of your website. You just need to get your head around it. Not to mention that WPML integrates automatically with WordPress translations. And it doesn't matter if you use ACF, VPB, Woo, EDD or anything else – all can be translated with WPML
I think I would recommend:
WooCommerce, WPML (wpml.org), Yoast SEO
This should work fine together and you can add as much languages as needed.
Maybe you need some other pay-plugins to optimise support but WPML in its premium version should already handle much and supports many plugins:
https://wpml.org/documentation/plugins-compatibility/
If you need further help you can write a message.
Update: At first, WPML support simply referred me to their list of hooks. But when I pressed them, they said none of those hooks could be used to do what I want.
So in light of that, what do you think might be the next best PHP-based approach? Is there a content filter which fires for all widgets content? If so, couldn't I attach a function to that which first confirms that the widget in-question is the WPML Multilingual widget, then filters the content and makes the URL edit I need?
Or should I just use the_content
filter? That seems perhaps overkill, or maybe obtrusive, since it would fire on every single post--correct?
Also at some point I guess we should keep in-mind that a pure JavaScript solution will not take very long to implement. I can of course go with that at time. At this point though, I'm more interested/curious to know how I might handle this with PHP.
The largest Wordpress Multi Language plugin is WPML.
There are others too. Check out this article about them.
I hope I understood you correctly: you have one main language and 6 languages you want to translate in.
domain.com – main language domain.com/xyz/ – for the other languages
You can easily configure WPML to do this. Follow these steps from their documentation section: https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/
Hope this helps! ✌️
This is a WordPress site right? The usual plugin for this is WPML. Usually you'd want to create one site with different versions of the same page, rather than two independent sites...
With two sites you'd have to somehow map every single page to it's corresponding page on the other site, on both sites. Frankly that sounds like a PITA and hard to maintain.
Honestly, personally I've never compared performance between WPML and Polylang as the first one has much more features than the later (but maybe I should do it for some common usage scenarios). :)
If Polylang satisfies you I am not against it :) I have been using it personally too. Just in case you need to migrate one day to WPML, we have a plugin for this :P https://wpml.org/documentation/related-projects/migrate-polylang-wpml/
I know the WPML plugin can handle all of your requirements, except for:
> Is it possible to use the same page still but dependant on the users location populate the content with the language text stored in wordpress/woocommerce. Then, if there is no stored content then use google translate.
Out of the box, WPML offers no easy/automated way to do this. Let's say your site's default language is English, and you use WPML to create a French translation of the site. WPML makes it easy to duplicate your 'About Us' page from English to French, so that your French 'About Us' page has the exact same content as your English page (i.e. it displays English text). WPML also makes it easy for you to replace that English text with French text that you add manually. What it cannot do easily is detect whether or not a page has had a manual French translation added, and if not, automatically display a Google translation of the English text. Nor have I found a separate Google plugin that can play nicely with WPML to do this. I believe you would need to write a fair bit of custom code, using the Google Translation API, to do this. As an alternative, WPML allows you to easily translate your English text, with a few clicks in the WordPress back-end, into French, using a different translation engine: Microsoft Azure. That would be done using WPML's Advanced Translation Editor.
on cue :)
https://wpml.org/version/wpml-4-1-4/
> WPML Multilingual CMS 4.1.4 > Released on: January 22, 2019 > > Fixed an issue with infinite redirection when the URL contains the REST URL prefix.
> Changed a documentation link about translating Gutenberg pages so that it opens in a new browser tab.
> Removed a jQuery dependency from the browser redirect script (fixes Uncaught ReferenceError: jQuery is not defined).
> Fixed an issue with assigning a category in the wrong language with Enfold.
> Fixed a PHP Notice thrown on the post edit screen for an Elementor page.
> Fixed an issue with duplicated string in Beaver Builder translation job.
> Fixed an issue with Divi global sections losing translations after page update.
> Stopped converting system admin notices to block editor notices.
> Fixed an issue with Elementor’s maintenance mode when String Translation is not active.
> Fixed the Divi global module strings which should be displayed only in the global module’s translation job.
> Add an HTML validator.
> Fixed an issue with canonical redirection for translated paged content and “lang” as parameter.
> Fixed an error when adding an attachment into a hierarchical post.
> Fixed the widget titles which were not translated in WPBakery “widgetised sidebar”.
The e-mail with the clickable link is a fake, be careful. DO NOT CLICK that link. This was confirmed by WPML's staff at https://wpml.org/2019/01/wpml-org-site-back-to-normal-after-an-attack-during-the-weekend/
It is Sunday January 20, 7:00 AM UTC. I haven't received any email from WPML, nor is the WPML post still active, nor does the pricing page contain any mention about security holes. I use WPML on several client sites, and would be very concerned about a vulnerability.
Yep, the Purchase page is currently also defaced, mentions “Security holes?” as a feature for all variants: https://wpml.org/purchase/ I’m afraid the point being made is all WPML users are vulnerable. Trying to wake people up over there via Twitter but no response yet.
You can use a plugin like WPML (which I believe handles things like the lang tags and all that for SEO). I generally do multilanguage sites with a multisite setup, but if you're not publishing new content in your native language I wouldn't recommend it.
I am using WPML for hreflang tags, from past 6 months and no issue with Google. Everything seems good like indexing, crawling and ranking of Chinese content but Now from a month want to rank in Baidu but not succeeded.
Yes, it is done by human translator so no issue of any grammar error etc.
WPML should be able to do everything you need, including serving the CN site to people in the CN region (or people with their browser language set to CN).
I use it on a few sites. As /u/Skip75 mentioned, it is indeed a beast in that it has a bit of a learning curve. But their support is pretty good, so if you ever run into a problem you can email them.
And as /u/tomaswilliamsa mentioned, make sure your theme is compatible with WPML. WPML has a list of compatible themes. But I know for sure that list is not 100% accurate. So best would be to ask them if your theme is compatible (although they may just consult that same list). My theme started off as compatible, but the theme devs went out of business, so it has since become incompatible. It causes some issues. All of them have workarounds, but some are a bit tedious.
Or check out something like this: https://wpml.org/2016/06/translate-photo-gallery-plugin-using-wpml/
Concept: Show English images/content if english language selected, show german images/content if german language selected.
Depending on how you build out your theme, multiple languages can be very tricky. The plugin I've used in the past for this is WPML. https://wpml.org/
I recommend the $80 which allows you to translate all the things you might not think about when building one from scratch like widgets, menus and permalinks. Well worth the investment.
It seems that WPML multi-lingual plugin has settings for this in combination with WooCommerce.
Even if you are using three subdirectories (/us, /fr, /uk), the best way (in my view) would be a single Wordpress install using multisite (it simplified the administration of the sites, and you can share plugins / theme / developments).
WPML works great to handle a multilingual website and is actually quite easy to setup - plus this plugin is maintained by OnTheGoSystems, which is currently a team of 78 full time staff. When choosing WordPress plugins/software, it's a smart idea to make sure it'll continue to be updated so all your hard work doesn't go to waste.
I would suggest against doing a multilingual website unless you have the content translated by human, a person that really speaks the language, and not automatically. Most of the time text translated by bot is unreadable and will not make sense for any native speaker.
You mean to automatically translate from one language to another? I'm not aware of anything like that.
There are a few plugins that enable multi-languages though, but you have to manually translate the content (or outsource it). Depending on the language of the user's browser it will serve up the matching language (if you have a translation of that page/post).
The one I like the most is Polylang (free, fast, awesome). The big pay one is WPML, lots of plugins and services (like translation services).
Are you looking for XML sitemaps in particular? Not sure about that, but for whole-site translations, I've been working with WPML the past couple days and so far it's been a breeze.
It's a topic of debate that probably, ultimately, like ~~all~~ most things in IT, doesn't have a right or wrong answer. It's all about the project, the real-world problem at hand, and how best to solve it. For small-scale projects with rather loose design, WP is second to none (and loose doesn't mean that it can't be utterly beautiful, and it's costs certainly much less to run a low-traffic WP website than a Drupal one). For larger-scale projects, serious integration with other IT components (think systems, think ADDS, etc.), Drupal is exactly what Caraes_Naur says.
Here's a good read; though partial to Drupal, it has some good point to consider on the business side of things (selling websites, serving your clients well and locking their confidence), which makes Drupal a preferred choice for selling websites (external consulting, pro-skilled coders) and WP more of an in-house solution (easy to implement, lower skill reqs.), imho.
> https://wpml.org/2013/11/drupal-developers-make-x10-wordpress-developers/
Though if it were my business, I'd know how to use both and would advice my clients to pick one or the other depending on their project scope and inherent nature/workflow. I'd make sure I can deliver what they ask, which is always possible in Drupal, but sometimes quite problematic in WP (because: reverse-engineering and so forth, it's just a theme) if there are very specific needs or requirements.
Edit: in the same vein, this post from developer-tech.com. Quotes:
> It is hard to make good money in WordPress. Drupal is far less crowded and the money made is double for every sales cycle.
> So, if this WordPress craze has you wondering which CMS is best for your business, ask yourself how much do you like to sell? WordPress is a salesman’s market, while Drupal remains a developer's market. (emphasis mine)
You might want to look into https://wpml.org/. Although it uses subdirectories instead of subdomains for translations, you can put together some htaccess redirects to map subdomain pages to subdirectory pages.
"My guess is that WPML is getting in the way of the default front page logic which is normally harmless but with data objects now being persisted created some problem."
While I also find WPML irritating, I don't think this is the issue. https://wpml.org/2015/01/wpml-3-1-9-beta-supports-object-caching/
Caching can be complicated, don't just blame it on WPML.
Also, what type of Swiss Alp's B&B website needs object or any caching really? You have that much traffic, your host is being hit that hard, or are you trying to make up for crap code?