# polylang/0.5/include/api.php

Polylang, version 0.5. 28 lines.

- Page: https://pluginprobe.com/plugins/polylang/0.5/code/include/api.php
- Raw: https://pluginprobe.com/plugins/polylang/0.5/raw/include/api.php
- Modified: 2011-12-07T20:13:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/polylang/0.5/code/include/api.php#L10-L20`.

```php
<?php

// template tag: displays the language switcher
function pll_the_languages($args = '') {
	global $polylang;
	return $polylang->the_languages($args);
}

// among the post and its translations, returns the id of the post which is in the language represented by $slug
function pll_get_post($post_id, $slug) {
	global $polylang;
	return $polylang->get_post($post_id, $slug);
}

// among the term and its translations, returns the id of the term which is in the language represented by $slug
function pll_get_term($term_id, $slug) {
	global $polylang;
	return $polylang->get_term($term_id, $slug);	
}

// acts as is_front_page but knows about translated front page
function pll_is_front_page() {
	global $polylang;
	return $polylang->is_front_page();
}

?>

```
