Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opt-Out does not fallback to English #2960

Closed
anonymous-matomo-user opened this issue Feb 20, 2012 · 5 comments
Closed

Opt-Out does not fallback to English #2960

anonymous-matomo-user opened this issue Feb 20, 2012 · 5 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

If I'm calling the URL [http://example.com/piwik/index.php?module=CoreAdminHome&action=optOut&language=tw] 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.

@mattab
Copy link
Member

mattab commented Feb 20, 2012

You can call the API http://demo.piwik.org/index.php?module=API&method=LanguagesManager.getAvailableLanguages to get the list of supported languages.

@mattab
Copy link
Member

mattab commented Feb 20, 2012

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.

@robocoder
Copy link
Contributor

(In [5871]) refs #2960

@robocoder
Copy link
Contributor

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

I'll add some unit tests later.

@mattab
Copy link
Member

mattab commented Feb 23, 2012

Tests would be nice to have for sure :)

otherwise looks good to me!

@anonymous-matomo-user anonymous-matomo-user added this to the 1.7.x - Piwik 1.7.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants