We are now adding support for translation of texts created by other plugins. Many of our users asked us to try make it happen with your excellent All-in-One SEO.

If you add this support to your plugin, it would allow people who use AIO SEO and WPML to have everything multilingual. For people who don't use our plugin, it will work normally as it does now (single language).

Users don't need to do anything special for this translation to happen. There are no language tags to insert anywhere. All the translation is done in the translation screen of our plugin. Here is a link to the integration API:

Everything that is per post/page already runs multilingual as it is (due to our plugin's architecture). What's missing are all the texts entered in the plugin's admin screen (Settings->AIO). For example, the home title and description.

When users run a multilingual WP site they need these texts to appear in the correct language, so if you're in example.com you'll get the title and description in the default language (say English), but if you're visiting example.com/es/ you'll see those texts in Spanish. All the texts entered in the AIO admin screen would need to be translated.

What our plugin does is allow other plugins to register strings that need to be translated. Then, the user has a translation interface to enter translations in the site's languages. Finally, the plugin calls our translation function to display the string in its correct language. It works very similar to gettext, just supports user entered texts and not only static texts.

July 15, 20092:57 am

WordPress Professional

Guest

Guests

2

Hi Amir,

Thank you for posting your suggestion. Though I'm not particularly opposed to the idea, I'm not sure that it would be prudent or of great benefit to everyone. Offhand, I'm initially inclined to say that, from an SEO standpoint, you wouldn't want different versions of your site to be presented. For instance, if google.com saw something different than google.cn, which saw something different from google.fr, etc.

Let's open this up for discussion with the All in One SEO Pack and WordPress communities. Everyone, let us know your thoughts on this, so that Amir and I can figure out how to best help the community.

July 15, 20093:28 am

Amir

Guest

Guests

3

I'm posting about it in our blog/newsletter and I'll ask WPML users to jump in.

Just for the record, it's not different contents for the same URL. Each URL has unique contents and different languages have different URLs.

Everything under http://wpml.org/es/ is in Spanish. Right now, we can't use AIOSEO because we would get the same title and meta data for all the 'home' pages, regardless of their language. If AIOSEO allowed WPML to translate those fields then we could enter the translation for the home title for each language (as well as translation for the category, search, etc.).

Our issue is only with the texts in the admin section. The title, keywords and meta-description entered per page are fine. WPML assigned a language to each page, so that translations are actually different pages (linked together).

July 15, 20093:59 am

WordPress Professional

Guest

Guests

4

It sounds like all we need to do is for me to add a filter hook for the home page title to the All in One SEO Pack API. You could then hook into something like add_filter('aioseop_homepage_title','somefunction').

and then in

function somefunction($title){

logic to determine current language

$title = modifications;

return $title;

}

What do you think?

July 15, 20094:18 am

Amir

Guest

Guests

5

We're already providing API functions for that, which you can use. This way, your plugin's texts will be translated using the translation GUI that we already provide.

In your admin screen, you call:

icl_register_string($context, $name, $value)

You do that for each string in the admin panel.

$context is any name you choose to describe your plugin. 'All in One SEO Pack' would be just fine.

$name is the name for the string. For example 'Home title'.

$value is what the user enters (the string's value).

Then, when the page is rendered, you call:

icl_t($context, $name, $value)

If there's translation for that string, it will be returned. Otherwise, the original string is returned.

Of course, you need to wrap these two calls with function_exists() so that if WPML is enabled, it uses it, otherwise, it works normally.

WPML knows what the display language is, so you don't need to do anything besides making these two calls. It's only required for the admin strings. The per page/post texts are already OK.

The way users see it

Users keep working with AIOSEOP normally. When they want to provide traslation for the AIOSEOP strings, as well as other strings in the site, they go to Admin->WPML->String translation.

There they see a table of all the strings. Each string lists its translation status and they can filter by it too.

Once they enter translation there, it gets returned by the icl_t() function. If the strings change (because they were edited in the AIOSEOP admin screen), they're flagged as 'need update' in WPML's string translation screen.

July 15, 20094:28 am

WordPress Professional

Guest

Guests

6

Does the owner of the blog provide the translation for post content into all the languages?

July 15, 20094:45 am

Amir

Guest

Guests

7

Yes. It's just a GUI that lets the admin see what needs translation and enter the translations.

July 15, 20095:03 am

WordPress Professional

Guest

Guests

8

I think it would be best if you use AIOSEOP API hooks for this.

July 15, 20095:09 am

Amir

Guest

Guests

9

Sure. If there are already hooks to set those texts, we can use them. Where is it documented?

July 15, 20095:36 am

hallsofmontezuma

Guest

Guests

10

We've only had the hooks in the release version since this past weekend, so there isn't any documentation yet. I'm going to try to get a chance to make some complete documentation this week.

At the moment, there are filter hooks for aioseop_description, aioseop_keywords, aioseop_canonical_url, aioseop_title_single, and aioseop_title_page. They are all filter hooks, and you would use them the same as any WordPress API filter hooks, like the method that I displayed in the post above. That's all that exist at the moment, but I'll add more filters to the plugin as needed.

July 15, 20094:42 pm

senlin

Guest

Guests

11

Hi Admins and Amir,

I think it is an excellent initiative to try to make popular and great plugins collaborate with the multilingual project WPML offers. Translations are all manual, responsibility of the user and with that you see that people who are serious about having a true multi-lingual WordPress website, using WPML as their "partner" to get this done.

There was a plugin that tried and functioned for a bit, but the developers didn't evolve with WordPress, so apart from WPML there is not really any alternative. OK there are a few, but they don't offer the same user friendliness as WPML does and they certainly don't go as far as contacting developers of other plugins to collaborate.

I am aware that there are many people using WordPress for only language, but as global borders dissolve, I think also that being able to develop multi-lingual websites - with plugins that are adaptable to work in such environments - not only is important, but is a must...

It would be fantastic if All In One SEO Pack and WPML can start working together!

July 28, 200911:27 am

Raven

Guest

Guests

12

Any news regarding possible cooperation between you? I would be amazingly pleased if both my most favorite plugins for WordPress will be finally compatible. And I'm pretty sure a lot of people out there are using your wonderful plugins and would love to see this update! Could you please let us know if there is any progress?

July 28, 20093:30 pm

Amir

Guest

Guests

13

Hi Michael,

We're out with WPML which allows translating the All In One SEO strings. It's already running in the Contact Form 7 plugin and being added to several of other popular plugins such as WP Polls, WP-Email and others.

Is there any way to reconsider adding this as to a future AIOSEOP version? If you like, we can help with the code for that.

August 10, 200910:29 am

rickitambo

Guest

Guests

14

Guys!

PLEASE come to terms!!! There are a ton of people out there, programming different WP-Sites just to have multilingual SEO-friendly sites. This combination would be out of this world! Collaborate and the international commnuity will be fixed to using solely these two plugins, no discussion of any other plugin-alternatives used!

August 10, 200911:28 am

senlin

Guest

Guests

15

I second @rickitambo's post!

If you're looking for critical mass of users that have bi/multi-lingual sites, I think we have reached that already long long time ago!

Apart from US-based websites I think most European and Asian websites in one way or another use 2 or more languages. People who now want 2 or more languages basically have the following choice:- easy implementation of languages but SEO only in 1 language OR- SEO for all languages but no easy language integration (necessary to set up multiple websites with multiple WP installations)

The international community is way larger than you think, you just don't hear them to much, because they have to put all their energy in programming double (or more) the amount of websites.

All In One SEO and WPML are a GREAT combination!

I would even go so far (speaking for myself here though) to pay a fee to both Michael and Amir to have access to this combo!

September 2, 20094:59 am

Miketee

Guest

Guests

16

Hi

I am moving my blog from Movable Type to WP, it is multilingual and each languae has its own domain name. At first I went crazy trying to hack WP, but then I discovered WPML and life got easy. I also use AIOSEOP, another great plugin.

BUT ! As it stands now, all languages get the same home page meta and description, and the same title. If I leave these blank in AIOSEOP, I can hack in my own metas, but the title reverts to the WP blog title (from Settings), again same for all languages.

Will you come up with a common solution?

In the mean time, any way to disable title rewriting so I can plonk in my own title in a home.php template?

thanks for all the great work

Mike

September 2, 20096:31 am

senlin

Guest

Guests

17

Hi Mike,

I understand your concern and as I desribed in my previous post, for now it is still not possible to ue WPML and AIOSEO together.

The only solution is to use another plugin. It's a very simple plugin, from 2006 even) but still works perfect. With Custom Fields you fill in your own description and keywords and as long as you place wp_head right under the title tag, your meta description and keywords will be placed right under the title.

I have gone so far with both plugins that I don;t feel like rolling back. I think I'll do a dirty hack of lines 210, 228 and 595 in the class file, that should do it... until something better comes out!

cheers

Mike

September 2, 20096:48 am

senlin

Guest

Guests

19

Hmmm yeah I understand.

The only additional disadvantage of that is that when Michael comes with an update (and he does that on a regular basis) you have to dive back into the code. Or don't upgrade the plugin...

The Add Meta Tags plugin never receives an update and still works 🙂

Until Michael becomes convinced that he should cooperate with Amir the only "choice" I have is to use that one...

Good luck!Piet

September 2, 20096:49 am

Amir

Guest

Guests

20

I'd be very happy to help with this. Since I first posted about providing a multilingual ready version of AIOSEOP, we've had a lot of progress. Some popular plugins such as Contact Form 7 and YARPP use WPML's translation interface. It was a pretty quick addition for both of them and we're move than happy to help with that.

If we'll be allowed to contribute this change to AIOSEOP, we'll do it. It can be ready in a couple of days.