So I want to make my page to have multi language function, like German, English, and Hungarian. I started to learn OOP in PHP, and now I force myself to use OOP in everything, sure not a good idea, but I try to learn. So this is what I got so far:
<?php
class class_lang {
private $language;
public function __construct() {
$this->language = $_GET['lang'];
}
public function select_lang($var);
return ('language_'.$this->select_lang($var));
}
?>
So what is going on. On my index page i got 3 links (national flags) when i click 1 my class gets the value from the url like this: href="index.php?lang=uk". Now what i am not sure about is how do i make the string: cause my lang files i want to include look like language_uk.php , language_ge.php etc... So i just want to creat that string and pass it back to my index page in a value so i can include then the right file.