Docs    Facebook    FAQs

How does the plugin handle text and language translation?

Version 4.0 and above

Custom Facebook Feed is able to be fully translated into any language.

There are different types of text that are included within the plugin – some from Facebook and some generated by our plugin – but all can be customized.  For example, you can:

  • Translate all different types of text strings we include within the Custom Facebook Feed plugin
  • Change the language of the description text that Facebook sends to the plugin, eg: Smash Balloon added a photo
  • Select the language that the post text is in if posts have been created in more than one language on Facebook
  • Choose the language of the text in the Like Box widget
  • Change the order of the text from left-to-right (LTR) to right-to-left (RTL)
  • Change the “Text Before a Date” and “Text After a Date” allowing proper language translation and presentation for some languages such as German or French

Below are the different types of text that are used in the plugin:

The post text from Facebook

Description: This is the text that you type when creating your Facebook post

How to Translate: This will be displayed in whatever language it is written in on Facebook. If the posts have been created in multiple languages on Facebook then you can select which language to show the post in by using the “Localization” setting. To change this navigate to WordPress Dashboard > Facebook Feed > Settings > Feeds >  Localization

The “story” text from Facebook

Description: This describes what a post is about – such as ‘Smash Balloon added 6 photos’, or ‘Smash Balloon shared a link’.

How to Translate:

Settings page
You can select the language for this text in the following location: WordPress Dashboard > Facebook Feed > Settings > Feeds >  Localization

The text generated by our plugin

Description: This is text such as “View on Facebook”, “Share”, etc.. (See full list below).

How to Translate:

Settings page
You can manually translate this text in the following location: WordPress Dashboard > Facebook Feed > All Feeds > Feed Settings (Pencil) > Posts > Edit Individual Elements > Post Action Links > Use the “Customize Text” option to change the language

Other parts of the plugin can be translated in the following location: WordPress Dashboard > Facebook Feed > Settings > Translation 


Translate the date months

By default, the months in the date will be displayed in whatever language your WordPress site is set to in your WordPress settings – which can be found at: WordPress Dashboard > Settings > General > Site Language.  If you need to change the date months to be in a different language then you can do this by following the directions in this FAQ.


Change the order of the text from LTR to RTL (LTR left to right – common English format to RTL right to left – common Arabic format)

It is possible to change the text direction using Custom CSS. You may also want to change the alignment as well.  There are two steps to accomplishing this:

Step #1:  To affect only one feed and not all feeds add a class to the specific feed’s shortcode on your page:

[custom-facebook-feed feed=1 class="right-to-left"]

Step #2:  Add the following to your plugin’s Custom CSS setting (Dashboard > Facebook Feed > Customize > Misc > Custom CSS):

#cff.right-to-left p { direction: rtl; text-align: right; }


Change the “Text Before a Date” and “Text After a Date” allowing proper language translation and presentation for some languages such as German or French

Examples are…

The “Posted _ hours ago” text that appears in a post and more precisely the “ago” string is out of context in both French and German.

Using French, the correct term for the word “ago” term (“Il y a” in French) is placed before the mention of time, not after. For example : “3 months ago” would be translated in French : “Il y a 3 mois”.  So, if you translate “ago” to “Il y a” you of course get : “3 mois Il y a”, which makes no sense in French.

When using German, many date formats do not match with proper German phrases and the translation does not make sense. Using proper German one would say “vor 2 tagen” which means “ago 2 days”.  Without using custom solutions the translation brings up “2 tage vor” and this would not be correct in German structure.

Solutions for both:

  1. Go to your WordPress Dashboard – Facebook Feed – Customize – Style Posts (tabbed page) – scroll down to the ‘Post Date’ section.  Enter the French word “ll y a” or German word “vor” into the setting “Text before date” field.  This places the text “ll y a” or “vor” before the date itself.  Then save changes.
  2. Next under the ‘Custom Text / Translate’ tab enter a single space into the ‘ago’ text field at the very bottom of the table.  This removes the word “ago” and leaves a simple blank space in it’s place.

Below Version 4.0

Custom Facebook Feed is able to be fully translated into any language.

There are different types of text that are included within the plugin – some from Facebook and some generated by our plugin – but all can be customized.  For example, you can:

  • Translate all different types of text strings we include within the Custom Facebook Feed plugin
  • Change the language of the description text that Facebook sends to the plugin, eg: Smash Balloon added a photo
  • Select the language that the post text is in if posts have been created in more than one language on Facebook
  • Choose the language of the text in the Like Box widget
  • Change the order of the text from left-to-right (LTR) to right-to-left (RTL)
  • Change the “Text Before a Date” and “Text After a Date” allowing proper language translation and presentation for some languages such as German or French
  • Integrate with language plugins such as the WPML plugin

Below are the different types of text that are used in the plugin:

The post text from Facebook

Description: This is the text that you type when creating your Facebook post

How to Translate: This will be displayed in whatever language it is written in on Facebook. If the posts have been created in multiple languages on Facebook then you can select which language to show the post in by using the “locale” setting. For example:

English: [custom-facebook-feed locale="en_EN"]
German: [custom-facebook-feed locale="de_DE"]

The “story” text from Facebook

Description: This describes what a post is about – such as ‘Smash Balloon added 6 photos’, or ‘Smash Balloon shared a link’.

How to Translate:

Settings page
You can select the language for this text in the following location:
WordPress Dashboard > Facebook Feed > Localization

Shortcode options
If you wish to change the text only in a specific feed then you can just use the ‘locale’ option as demonstrated in this example:  [custom-facebook-feed locale="es_ES"]

The text generated by our plugin

Description: This is text such as “View on Facebook”, “Share”, etc.. (See full list below).

How to Translate:

Settings page
You can manually translate this text in the following location:
WordPress Dashboard > Facebook Feed > Customize > Custom Text / Translate

Shortcode options
If you wish to change the text only in a specific feed then you can just use the following shortcode options within the [custom-facebook-feed] shortcode:

The following text options are available in both the Free and Pro Versions:

seemoretext
seelesstext
facebooklinktext
sharelinktext
photostext

Date text:

second
seconds
minute
minutes
hour
hours
day
days
week
weeks
month
months
year
years
ago

The following text options are available in the Pro Version only:

maptext
previouscommentstext
commentonfacebooktext
likesthistext
likethistext
andtext
othertext
otherstext
noeventstext
interestedtext
goingtext
buyticketstext
replytext
repliestext

These shortcode text options correspond to the options on the plugin’s “Custom Text / Translate” settings page. For example;

[custom-facebook-feed locale="es_ES" seemoretext="See More" seelesstext="See Less" facebooklinktext="View on Facebook" sharelinktext="Share" photostext="photos" maptext="map" previouscommentstext="Previous comments" commentonfacebooktext="Comment on Facebook" likesthistext="likes this" likethistext="like this" andtext="and" othertext="other" otherstext="others" noeventstext="No upcoming events" interestedtext="interested" goingtext="going" buyticketstext="buytickets" replytext="reply" repliestext="replies"]

Please note, that before version 2.7 of the Pro plugin, and version 2.4.2 of the free version, you were unable to change the ’12 hours ago’ date text in the shortcode directly, it could only be changed on the plugin’s settings page, but this is now possible in the latest versions of the plugin. See the bottom of the shortcode options table for the shortcode settings needed to translate those text strings.


Translate the date months

By default, the months in the date will be displayed in whatever language your WordPress site is set to in your WordPress settings – which can be found at: WordPress Dashboard > Settings > General > Site Language.  If you need to change the date months to be in a different language then you can do this by following the directions in this FAQ.


Change the order of the text from LTR to RTL (LTR left to right – common English format to RTL right to left – common Arabic format)

It is possible to change the text direction using Custom CSS. You may also want to change the alignment as well.  There are two steps to accomplishing this:

Step #1:  To affect only one feed and not all feeds add a class to the specific feed’s shortcode on your page:

[custom-facebook-feed class="right-to-left"]

Step #2:  Add the following to your plugin’s Custom CSS setting (Dashboard > Facebook Feed > Customize > Misc > Custom CSS):

#cff.right-to-left p { direction: rtl; text-align: right; }


Change the “Text Before a Date” and “Text After a Date” allowing proper language translation and presentation for some languages such as German or French

Examples are…

The “Posted _ hours ago” text that appears in a post and more precisely the “ago” string is out of context in both French and German.

Using French, the correct term for the word “ago” term (“Il y a” in French) is placed before the mention of time, not after. For example : “3 months ago” would be translated in French : “Il y a 3 mois”.  So, if you translate “ago” to “Il y a” you of course get : “3 mois Il y a”, which makes no sense in French.

When using German, many date formats do not match with proper German phrases and the translation does not make sense. Using proper German one would say “vor 2 tagen” which means “ago 2 days”.  Without using custom solutions the translation brings up “2 tage vor” and this would not be correct in German structure.

Solutions for both:

  1. Go to your WordPress Dashboard – Facebook Feed – Customize – Style Posts (tabbed page) – scroll down to the ‘Post Date’ section.  Enter the French word “ll y a” or German word “vor” into the setting “Text before date” field.  This places the text “ll y a” or “vor” before the date itself.  Then save changes.
  2. Next under the ‘Custom Text / Translate’ tab enter a single space into the ‘ago’ text field at the very bottom of the table.  This removes the word “ago” and leaves a simple blank space in it’s place.

Switching the language of the feed when using a multilingual translation plugin (such as WPML)

If you’re using a multilingual plugin such as the WPML plugin to translate your pages into different languages then you’d need to use the following PHP code in your page to display the feed. It detects the language from the page URL and switches which shortcode is used. You can then add the translation settings to the relevant shortcode:

<?php
$page_url = "$_SERVER[REQUEST_URI]";
if (strpos($page_url , '/en') !== false) {
  echo do_shortcode('[custom-facebook-feed locale="en_EN"]');
} else if (strpos($page_url , '/fr') !== false) {
  echo do_shortcode('[custom-facebook-feed locale="fr_FR"]');
} else {
  echo do_shortcode('[custom-facebook-feed]');
}
?>

You can change the /en and /fr to match the languages you are using, and then change the locale setting in the shortcodes accordingly.

support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?