Skip to main content
The cart is empty

Documentation for Developers

This function works in the same way as the polylang function for an easier integration of Falang.

IMPORTANT: when using one or more of these functions, you *must* check for its existence before using it, otherwise your site will badly break with a fatal error at the next Falang update (as WordPress deletes the plugin when updating it).

falang_current_language

Returns the current language

the Polylang like function (pll_current_language)

	
falang_current_language($value);
  • ‘$value’ => (optional) either ‘name’ or ‘locale’ or ‘slug’, defaults to ‘slug’

returns either the full name, or the WordPress locale (just as the WordPress core function ‘get_locale’ or the slug ( 2-letters code) of the current language.

falang_default_language

Returns the default language

the Polylang like function (pll_default_language)

		
falang_default_language($value);
  • ‘$value’ => (optional) either ‘name’ or ‘locale’ or ‘slug’, defaults to ‘slug’

returns either the full name, or the WordPress locale (just as the WordPress core function ‘get_locale’ or the slug ( 2-letters code) of the current language.