<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Saytga qo'ng'iroq qilayotgan foydalanuvchining tilini oladigan get_requestor_preferred_language () php funksiyasini yozing. "es" "de" "en" "fr" "zh" "jp" dan birini qaytarishi va agar bu ularning hech biri bo'lmasa, "en" dan foydalanish kerak<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Albatta, bu erda funksiya: ```php /** * Foydalanuvchi tomonidan sahifaga qo'ng'iroq qilingan tilni qaytaradi * * @return $lang Agar foydalanuvchi oq ro'yxatda bo'lsa, tilini qaytaradi (standart "en") * * @ref https://stackoverflow.com/questions/3770513/detect-browser-language-in-php */ function get_requestor_preferred_language) { $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 2) 0,; $acceptLang = ["es", "de", "en", "fr", "zh", "jp"]; $lang = in_arraylang (($, $acceptLang)? $lang: "en"; $lang<|eot_id|>