How to get the current language code?

Hello,

I don’t know how to get the current language code.

Greetings

https://getkirby.com/docs/reference/objects/language

thank you @texnixe

<?php
	$language = $kirby->language();
	$lang_code = $language->code();

	$word_0 = "";
	$word_1 = "";

	if($lang_code == "de"):
		$word_0 = "reservieren";
		$word_1 = "ausgebucht";
	endif;

	if($lang_code == "fr"):
		$word_0 = "réserve";
		$word_1 = "complètement réservé";
	endif;
	
?> 

How can I create a lang-switcher? I’m using this here, it probably goes a bit more dynamically. How to get all languages ?

		<ul class="flex grid-col-60 language">
			<li><a href="<?php echo $page->url("de") ?>">de</a></li>
			<li><a href="<?php echo $page->url("fr") ?>">fr</a></li>	
		</ul>

I don’t know how to use this: https://getkirby.com/docs/reference/objects/languages/keys

https://getkirby.com/docs/guide/languages/switching-languages

Oh sorry I looked for a solution in the cookbook.

Thank you.