/** * Customize the cookie banner message based on site language. * * @param string $message Default cookie message. * @return string Translated cookie message. */ function cky_translate_cookie_message( $message ) { // Get the current language of the site. $current_lang = substr( get_locale(), 0, 2 ); // Example: 'en', 'pt', 'es'. // Define translations for cookie banner message. $translations = array( 'en' => 'This website uses cookies to ensure you get the best experience.', 'pt' => 'Este site utiliza cookies para garantir a melhor experiência.', 'es' => 'Este sitio utiliza cookies para garantizar la mejor experiencia.', ); // Return the message based on the current language or default to English. return isset( $translations[ $current_lang ] ) ? $translations[ $current_lang ] : $translations['en']; } /** * Customize the text of the cookie banner buttons based on site language. * * @param array $button_texts Default button texts. * @return array Translated button texts. */ function cky_translate_cookie_buttons( $button_texts ) { // Get the current language of the site. $current_lang = substr( get_locale(), 0, 2 ); // Define translations for buttons. $translations = array( 'en' => array( 'accept' => 'Accept All', 'settings' => 'Cookie Settings', ), 'pt' => array( 'accept' => 'Aceitar todos', 'settings' => 'Configurações de cookies', ), 'es' => array( 'accept' => 'Aceptar todo', 'settings' => 'Configuración de cookies', ), ); // Return the button texts based on the current language or default to English. return isset( $translations[ $current_lang ] ) ? $translations[ $current_lang ] : $translations['en']; } /** * Apply translations to cookie banner texts. */ add_filter( 'cli_cookie_message', 'cky_translate_cookie_message' ); add_filter( 'cli_cookie_buttons', 'cky_translate_cookie_buttons' ); {"id":39238,"date":"2016-05-31T19:09:33","date_gmt":"2016-05-31T22:09:33","guid":{"rendered":"http:\/\/www.mobilegamer.com.br\/?p=39238"},"modified":"2016-05-31T19:15:57","modified_gmt":"2016-05-31T22:15:57","slug":"dynasty-warriors-mobile-anunciado-mas-e-um-jogo-de-luta-2d-para-android-e-ios","status":"publish","type":"post","link":"https:\/\/www.mobilegamer.com.br\/2016\/05\/dynasty-warriors-mobile-anunciado-mas-e-um-jogo-de-luta-2d-para-android-e-ios.html","title":{"rendered":"Dynasty Warriors Mobile anunciado! Mas \u00e9 um jogo de luta 2D para Android e iOS!"},"content":{"rendered":"

\"dynasty-warriors-android-ios-1\"<\/a><\/p>\n

Dynasty Warriors \u00e9 uma franquia de jogos hack’n slash que focada na pancadaria com centenas de personagens na tela. A vers\u00e3o mobile, prevista para Android e iOS, no entanto, ser\u00e1 um jogo de luta 2D. N\u00e3o \u00e9 a primeira vez que franquia popular Playstation’s japoneses chega aos celulares, mas ser\u00e1 a estreia do Dynasty Warriors nas “telinhas” ocidentais.<\/p>\n

Leia tamb\u00e9m:<\/p>\n