Add 3rd language localizer

Hello!
A client wants to add a third language in her site, does anybody know how do I do that in localizer_init.php?
Thanks in advance!
Here’s the code:
indent preformatted text by 4 spaces

<?php // Checking for locale and storing in session session_start(); $locale = ""; // 1. url parameter // if set, will overwrite stored locale in session parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY)); if ($locale && strlen($locale) > 1) { $locale = substr($locale, 0, 2); } // 2. session storage // if no url parameter is given, check if there is already a stored locale in session if (strlen($locale) == 0){ if ($_SESSION["locale"] && strlen($_SESSION["locale"]) == 2){ $locale = substr($_SESSION["locale"], 0, 2); } } // 3. browser // if no locale was given in url parameter or session, take browser locale if (strlen($locale) == 0){ if ($_SERVER['HTTP_ACCEPT_LANGUAGE']) { $locale = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); } } // 4. fallback // if no language was given by the browser, set language to en if (strlen($locale) == 0) { $locale = "en"; } $_SESSION["locale"] = $locale; ?>
2 Likes

Hi, Localizer works with all unlimited languages already. Fallback en

1 Like

really? Oh that’s great, so if I add -fr to the blocks, it will take the -fr ones, thanks!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.