Language Redirector icon

Language Redirector

Version 3.1.1

May 3, 2024

Fixed

  • Fixed issue with _getSitesPerLanguage Twig method when no language groups are defined

Version 3.1.0

April 26, 2024

Added

  • Added Twig function getGuessedLanguage for guessing the user's preferred language
  • Added Twig function getSavedLanguage for getting the language preference that is saved in the user's session
  • Added Twig function hasLanguageSuggestion for getting a bool indicating if a better language match exists for the user
  • Added Twig function getInformationForLanguage for getting Site information from a language string

Version 3.0.0

April 21, 2024

Fixed

  • Added support for Craft CMS 5.x

Version 2.0.1

June 10, 2022

Fixed

  • Fixed language matching issue that would occur when the locales in the config file are not lowercase

Version 2.0.0

May 15, 2022

Added

  • Added support for Craft CMS 4.x

Version 1.5.3

December 3, 2020

Fixed

  • Fixed issue where visitors where automatically redirected to the defaultEntryId when it is defined. The defaultEntryId should instead only be used when calling the language switcher variable.

Version 1.5.2

November 18, 2020

Fixed

  • Fixed edge case of $defaultEntryId, when an entry exists in a Site but is disabled

Version 1.5.1

November 6, 2020

Fixed

  • Fixed release numbering format

Version 1.5.0

November 6, 2020

Added

  • Added defaultEntryId setting to default to a specific Entry when the current Entry is disabled in other Sites

Version 1.4.0

November 5, 2020

Added

  • Added group parameter to getUrls method so that the list of URLs in a specific language group can be retrieved

Version 1.3.4

March 23, 2020

Changed

  • Complied with psr-4 and eliminate composer deprecation warning

Version 1.3.3

March 5, 2020

Changed

  • Removed __construct method and moved the methods that were inside __construct after canRedirectVisitor method is called

Version 1.3.2

March 5, 2020

Changed

  • Moved the initial check to a public function within the main service

Version 1.3.1

November 26, 2019

Fixed

  • Replaced request.app.isLivePreview with request.app.livePreview, which was deprecated in Craft CMS since v3.2.1

Version 1.3.0

November 18, 2019

Added

  • Added support for multi-group Sites (multiple Sites inside multiple Site groups)

Changed

  • Crawlers are now subject to a redirection that only removes the lang URL query parameter

Version 1.2.1

September 26, 2019

Fixed

  • Fix for initializing plugin in console environment (thanks to @boboldehampsink)

Version 1.2.0

June 2, 2019

Added

  • Added method that defaults to fetching the Sites and languages defined in the Sites table, should the list of Sites be undefined in the plugin's settings (thanks to @jcherniak)

Version 1.1.3

April 9, 2019

Added

  • Added setting to enable/disable the redirection all together, and only keep the language switching feature

Version 1.1.2

December 9, 2018

Changed

  • Disable redirection for URLs that contain the ignore-lang parameter

Version 1.1.1

December 8, 2018

Added

  • Added option to overrides URLs per language in the language switcher

Version 1.1.0

October 19, 2018

Added

  • Added setting to enable/disable the redirection for users with CP access

Version 1.0.8

September 10, 2018

Changed

  • Used Craft's i18n service instead of the php-intl extension

Version 1.0.7

July 28, 2018

Changed

  • Initialize the language match only after the app is fully initialized

Fixed

  • Fixed a bug that would occur if the currently-visited entry wasn’t enable in all Sites

Version 1.0.6

July 12, 2018

Fixed

  • Called the exit() function after setting the location header

Version 1.0.5

June 10, 2018

Fixed

  • Fixed a bug that would occur when mixing language-based and country-based locales in the configuration file

Changed

  • Now using PRS-2 and Symfony code syntax rules

Version 1.0.4

June 8, 2018

Fixed

  • Fixed a bug that would occur when a redirected URL already contains URL parameters (thanks to @vieko)

Version 1.0.3

June 8, 2018

Fixed

  • Fixed return value bug when craft.languageSwitcher.getUrls wouldn't return any language

Version 1.0.2

April 22, 2018

Changed

  • Prevent redirect if the target Element doesn't exist
  • Hide elements for which no entry exist in the language switcher

Removed

  • The "enabled" setting

Version 1.0.1

April 8, 2018

Added

  • Documented the plugin

Changed

  • Merged files and classes

Version 1.0.0

April 8, 2018

Added

  • Initial release