4 Ways To Show Different Content Based on Translation Language

This tutorial shows you how to display different content for English language readers and othr content for other languages.

You can use the first 2 code snippets for any country supported by the WPML plugin:

different-countries

There’s 4 code snippets which display different types of content in this post.

  1. The 1st code snippet assumes the use of the Soliloquy slider and the WPML language plugin as its checks that both are installed and active.
  2. The 2nd code snippet includes an example for displaying a different widget and also assumes the use of the WPML language plugin which it checks for. It displays different widgets for French & English.
  3. The 3rd solution doesn’t require the use of a translation plugin however it does check for translated content.
  4. The 4th solution assumes the use of the qtranslate plugin.

Swap out the country codes to suit your own requirements.

Here’s the code for logged in members:

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.