Opened 2 years ago

Closed 2 years ago

#2960 closed Bug (fixed)

Opt-Out does not fallback to English

Reported by: hass Owned by: vipsoft
Priority: normal Milestone: 1.7.x - Piwik 1.7.1
Component: Core Keywords:
Cc: Sensitive: no


If I'm calling the URL a page with Language file 'tw' not found. is shown and some links to piwik are shown. This breaks usability and the integrated user interface. As I'm integrating with Drupal, I have no clue what languages Piwik supports. Drupal supports any language.

I do not like to add any static conditions to the Piwik module code just to make this working at all times and fallback to English if Piwik have no support for a language.

Please make a fallback to English if the language is not found in Piwik.

Change History (5)

comment:1 Changed 2 years ago by matt (mattab)

  • Resolution set to wontfix
  • Status changed from new to closed

You can call the API to get the list of supported languages.

comment:2 Changed 2 years ago by matt (mattab)

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I agree that because "opt-out" is public on the website, it would make sense in this case to catch the exception and use english instead.

comment:4 Changed 2 years ago by vipsoft (robocoder)

  • Owner set to vipsoft
  • Status changed from reopened to new

Instead of the hardcoded "en", the "fallback language" is default_language in config/global.ini.php.

I'll add some unit tests later.

comment:5 Changed 2 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

Tests would be nice to have for sure :)

otherwise looks good to me!

Note: See TracTickets for help on using tickets.