Skip to content
Free

Multilingual sites and translations

Serve the right PDF per language with WPML or Polylang, and run the plugin in your language.

1 min read Updated

On this page

One PDF per language#

Foliora understands WPML and Polylang. When a viewer shows a Media Library PDF that has a translation for the current language, Foliora swaps in the translated file automatically.

  1. Translate the PDF in the Media Library — WPML Media Translation, or Polylang's media translation option.
  2. Upload the translated PDF as that translation.
  3. Embed the original PDF once. Visitors on each language see their file.

You can also simply put a different PDF on each language version of a page.

Translating block content with WPML#

Foliora ships wpml-config.xml, which marks the viewer block's file and title attributes as translatable.

Custom rules#

Pick a different attachment with the foliora/translate_attachment_id filter, or change any attribute per language with foliora/viewer_atts (hook at priority 10 or later — Foliora's own swap runs at 5).

add_filter( 'foliora/viewer_atts', function ( $atts ) {
	if ( function_exists( 'pll_current_language' ) && 'fr' === pll_current_language() ) {
		$atts['file'] = 'https://example.com/docs/guide-fr.pdf';
	}
	return $atts;
} );

The plugin in your language#

  • Foliora is translation-ready; a .pot file is included.
  • A Bengali (bn_BD) translation ships with the plugin.
  • Language packs from translate.wordpress.org take precedence over the bundled files.
  • Foliora Pro includes its own foliora-pro.pot.