so there will be 2 arrays. One is fixed:
$array1 = "Animation" => "Animācija/Multfilmas",
"Multiplication" => "Animācija/Multfilmas",
"Action" => "Asa sižeta filmas",
"Detective" => "Detektīvs",
"Documentary" => "okumentālās filmas",
"Drama" => "Drāma",
"Adventure" => "Piedzīvojumu filmas",
"Comedy" => "Komēdija",
"Crime" => "Trilleris",
"Thriller" => "Trilleris",
"Fantasy" => "Fantastika / Sci-Fi",
"Sci-Fi" => "Fantastika / Sci-Fi",
"Family" => "Ģimenes filmas",
"History" => "Vēsturiskas filmas",
"Horror" => "Šausmu filmas",
"Musical" => "Mūzikls",
"Music" => "Mūzikls",
"Romance" => "Romantika",
"Mystery" => "Mistērija",
"Sport" => "Sports",
"Western" => "Vesterns",
"War" => "Kara filmas"
and second one will contain something different each time, let me give 2 random examples of what it can contain:
$array2 = "War", "Western", "Romance"
or
$array2 = "Comedy", "Drama"
OK, so the idea is to make a function that changes "Comedy" to Komēdija etc (translating) and if on the end there are 2 identic values, make it one, because Crime and Thriller both are being translated as Trilleris, so if a movie has both genres it will show up as Trilleris, Trilleris once translated and thats kinda stupid.