Localizing AIOSEO Data via the Translations API

In All in One SEO 4.2.2 we introduced a number of filter hooks that make it easier for multilingual plugin developers to integrate with our plugin.

Common uses for these filter hooks are:

  • Localizing the post/term meta AIOSEO outputs in the source code
  • Integrating with the multilingual sitemap capabilities of AIOSEO
  • Localizing the options of AIOSEO (e.g. default title/description formats)

Localizing Post/Term Meta

One of the core functionalities of All in One SEO is outputting SEO data, social markup and JSON schema into the source code of every page.

AIOSEO stores this data in its own custom tables, aioseo_posts and aioseo_terms. As a result, this data cannot be accessed like traditional post/term meta.

Filtering Data When it is Loaded

When this data is loaded, it can be filtered using the aioseo_get_post and aioseo_get_term hooks.

The data is typically only loaded once per request and should stay consistent for the duration of the request.

Filtering Data When it is Saved

If needed, the data can also be filtered before it is saved by using the aioseo_save_post and aioseo_save_term hooks.

Please note the following:

  • If a post is saved via the Block Editor, then this hook will run twice. Once when the post is saved via the REST API by the Block Editor; another time when the post is saved via a regular POST request.
  • AIOSEO should automatically sanitize any of the data you've filtered, but we still implore you to adequately sanitize any data you manipulate on your end as well.

Integrating with the multilingual sitemap

All in One SEO is capable of generating a multilingual sitemap if you tell it what the translated versions of each post/term are. You can add dynamically add this information using our aioseo_sitemap_post and aioseo_sitemap_term hooks respectively.

Supported Plugins

The following multilingual plugins have been confirmed as compatible with AIOSEO:

  • WPML

These plugins may support AIOSEO, but have not been confirmed yet:

  • TranslatePress
  • Polylang
  • Weglot
  • MultilingualPress
  • qTranslate-XT
  • WPGlobus

Don't see a plugin on this list or does your multilingual plugin not support AIOSEO yet? Then please reach out to the developer of the plugin and ask them to add support. You can refer them to this page for technical information on our filter hooks.

Are you a developer and do you need help to integrate your plugin with All in One SEO? Send us a message via our Basic Question form and we will be in touch with you shortly.