mirror of
https://github.com/Findus23/plugin-LanguageToogle.git
synced 2024-09-10 05:13:46 +02:00
use local names for languages
This commit is contained in:
parent
90da5df0b5
commit
783f062093
3 changed files with 15 additions and 7 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -1,14 +1,23 @@
|
|||
## Changelog
|
||||
|
||||
0.2.0
|
||||
### 0.3.1 (Matomo 4+ only)
|
||||
|
||||
- use local names for languages
|
||||
- move menu entry right of "Tag Manager"
|
||||
|
||||
### 0.3.0
|
||||
|
||||
- Matomo 4 compatibility
|
||||
|
||||
### 0.2.0
|
||||
|
||||
- replace multiselect with new multituple (needs Matomo 3.5.0)
|
||||
|
||||
0.1.4
|
||||
### 0.1.4
|
||||
|
||||
- performance improvements
|
||||
|
||||
0.1.3
|
||||
### 0.1.3
|
||||
|
||||
- update version in plugin.json
|
||||
|
||||
|
|
5
Menu.php
5
Menu.php
|
@ -27,13 +27,12 @@ class Menu extends \Piwik\Plugin\Menu
|
|||
$languages[$lang["code"]] = $lang;
|
||||
}
|
||||
foreach ($settings->availableLanguages->getValue() as $setting) {
|
||||
$code=$setting["languageCode"];
|
||||
$code = $setting["languageCode"];
|
||||
if (isset($languages[$code])) {
|
||||
$additionalParams["lang"] = $code;
|
||||
$menu->addItem($languages[$code]["name"], null, $this->urlForDefaultAction($additionalParams), $orderId = 30);
|
||||
$menu->addItem(Piwik::translate("Intl_Language_" . $code), null, $this->urlForDefaultAction($additionalParams), $orderId = 35);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "LanguageToogle",
|
||||
"description": "Quickly change the language of Matomo",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"theme": false,
|
||||
"require": {
|
||||
"piwik": ">=4.0.0-b1,<5.0.0-b1"
|
||||
|
|
Loading…
Reference in a new issue