@zawadzinski opened this Issue on April 5th 2008 Contributor


From now on all translations should be done in : http://translations.piwik.org/

please register there. See also: http://piwik.org/translations/

This plugin makes translating Piwik a very nice and easy process!


  • Download the plugin at: http://dev.piwik.org/trac/raw-attachment/ticket/171/TranslationsAdmin.zip
  • Go to the Piwik UI, log as Super User, Install the plugin
  • Go to the translator tab, update/create the new language file
  • Test your translation in your Piwik with real data (if you need data, you can generate some by clicking on the API link at the top of the screen - there is a link on this page to generate fake data)
  • Once you are happy with the translation and you believe it can be useful to other Piwik users, click on the export button in the plugin and submit to translations att piwik.org

Would you like to help updating an existing language or add a new language in Piwik? More info on the translations page: http://piwik.org/translations/

@mattab commented on November 15th 2011 Owner

Attachment: Translators user interface plugin - Piwik 1.6+

@zawadzinski commented on May 4th 2008 Contributor

How should it work? (first see attached screenshot)

  • first translator chooses language - plugin loads all of translation files
  • it shows all of translations strings or only for choosen plugin (
    • first column definition
    • second column default string (always english)
    • third column editable field filled with choosen language translation (if strings for choosen language are unavailable it displays empty fields)
  • after clicking 'save' button plugin saves new translations strings (in appropriate files associated with each plugin)
@mattab commented on May 5th 2008 Owner

Maciej, sounds good to me.
Maybe the input should be textarea as some translation strings are pretty long.

@zawadzinski commented on May 7th 2008 Contributor

Basic functionality of plugin implemented. We can start translating Piwik into as many languages as possible :)

@anonymous-piwik-user commented on May 7th 2008

Sounds very well, but how to commit the new language to svn?
Also it would be nice to save the language files, so that you should put the translations into another installtion ... (difficult to describe but you understand).

@zawadzinski commented on May 7th 2008 Contributor

It is work for translator coordinator http://piwik.org/blog/2008/05/piwik-is-looking-for-a-translator-coordinator-be-part-of-the-piwik-team/

basically after translating new language execute:

$ svn stat | awk '{if($1 == "?") print $2}' | xargs svn add
$ svn diff > lang.patch

and send lang.patch to the translator coordinator

@anonymous-piwik-user commented on May 9th 2008

Yes, mauser this is the way we would do. But what about these users who wants to translate and do not know svn?

@mattab commented on May 9th 2008 Owner

mauser, I agree with maetrus, we would need a "Export all languages files to ZIP" link, that would create a ZIP of all the languages files in the right directories so that we only have to extract this zip on the piwik root folder, and everything would go in place.
Using php5 zip features should do the trick, we have to make sure it works on 5.1 (I can see on http://ie2.php.net/manual/en/zip.setup.php that they talk about 5.2)

mauser, do you reckon you can add this feature? :)

@mattab commented on May 9th 2008 Owner

mauser, I removed your function to create directories in Piwik.php because it was only used by your plugin. Please move it instead in your plugin class.

Please attach your plugin files in a .zip on this ticket, instead of attaching the patch.

I committed your other changes and they are available in the 0.1.8 release.

@anonymous-piwik-user commented on May 13th 2008

Please give also a look to the tool used by the RoundCube guys:


I find it very useful and easy to use.
I'm doing Italian translation just now. I will be your bug-hunter :)

@zawadzinski commented on May 13th 2008 Contributor

I attach plugin as a .zip file.
Those who had problems with applying patch, please just unzip the archive in plugins/ directory.

I will add export feature tomorrow.

@zawadzinski commented on May 17th 2008 Contributor

new version with import/export feature,

unzip file TranslationsAdmin.zip in your plugins/ directory and activate plugin

@anonymous-piwik-user commented on May 18th 2008

Maybe overkill, but a very good tool http://drupal.org/project/l10n_server.

@anonymous-piwik-user commented on May 21st 2008

How to activate the new language?
Is there an UI for change the language at runtime or have I to change config.inc.php by hand?

@mattab commented on May 29th 2008 Owner

maetrus, at the moment you have to change the setting by hand.
we need a UI to change this setting. but this is a different ticket (that you can create)

@anonymous-piwik-user commented on June 14th 2008

Im new at piwik. im already there to improve the language german and french. but i like to do more.
i study webdesign in belgium but my php knowledge isn't the best (Low Skill and learning). I learn fast. and i can work for the UI.

@anonymous-piwik-user commented on September 7th 2008

Not working, see #5764

@mattab commented on October 10th 2008 Owner

Maintaining this plugin is now high priority.

@zawadzinski commented on October 11th 2008 Contributor

if you got problem with the plugin please update to current trunk version of Piwik

@anonymous-piwik-user commented on October 18th 2008

Replying to mauser:

if you got problem with the plugin please update to current trunk version of Piwik
using trunk r640 + translationsAdmin from 10/11/08:when updating translations using the translationAdmin + the filter by plugin option,
all translations entries stored on the lines after those from the updated plugin will be erased. of course no issues when selecting '-- all translations --'

@zawadzinski commented on October 23rd 2008 Contributor

I made some minor modifications. It is working with r640 on my system.

@mattab commented on November 4th 2008 Owner

just to let you know, we published a new version today: the 0.2.12 that includes the language drop down selector and lots lots of bug fixes. Hopefully the translator plugin is working on this version. good luck all translators! thank you for your great job :)

@anonymous-piwik-user commented on November 5th 2008

It's not working with r685 (r686, version tag 0.2.16). When it's active, all the administration menus disappear.

PS: I've got a new version of the Catalan translation, which I sent to translations[at]piwik[dot]org on 29th Oct but hasn't been updated on SVN.

@anonymous-piwik-user commented on November 8th 2008

working like a charm with 0.2.17

@anonymous-piwik-user commented on November 23rd 2008

Hi all. I have problem translating UserCountry plugin. Everything before UserCountry_country_sc (Seychelles) can be translated (and saved) but from this point on translation is not saved. I am not getting any error or warning displayed so I can't tell what's wrong. I am translating Piwik 0.2.23.

@anonymous-piwik-user commented on November 23rd 2008

benke, I updated my translation on 0.2.23 and the plugin worked great (I chose -- all translations --). Which version of the plugin are you using? (I use the one from 23th Oct)

@anonymous-piwik-user commented on November 23rd 2008

The same version as you but I didn't chose all translations, I choose only UserCountry plugin but behaviour is same - the country names from Seychelles on can't be translated. I can download language file, edit in editor (translate Seychelles and so on), upload it, open in TranslationsAdmin pluign and everything looks fine. If I just save this translation (without editing from within plugin) all remains intact. If I decide to translate further and save, the new translations will be lost :(

@anonymous-piwik-user commented on November 23rd 2008

I finished translation locally and then uploaded it onto the server. Will test it and tweak next few days and then will send final version to Noah - the Serbian translation of Piwik :)

Regarding issue I had with this plugin, the only thing that come on my mind so far is that, because UserCountry plugin have lot of strings to translate, it may be that there's no enough memory to save it so translation is truncated. I will try to fiddle the allowed memory or what it is called parameter and then let you know.

@robocoder commented on October 23rd 2009 Contributor

In #1015, manne reports:
if there is a lang attribute in each textarea, a spell checker (e.g. in Opera, Firefox) uses the right dictionary.

See attachment.

@anonymous-piwik-user commented on October 23rd 2009

Replying to vipsoft:

In #1015, manne reports:
if there is a lang attribute in each textarea, a spell checker (e.g. in Opera, Firefox) uses the right dictionary.

See attachment.

I also fixed the vertical alignment of the first 2 columns to style="vertical-align: top;"

@hansfn commented on October 23rd 2009

Comment to translation-plugin-patch.txt above:

  1. It wasn't possible to change the plugin that you wanted to translate after the initial selection (because getRequestVar merged $_GET and $_POST and they were different).
  2. There were no status for the plugins. I added a "x of y strings translated" message.

PS! Patch tested with Piwik 0.4.3 .

@robocoder commented on January 5th 2010 Contributor

I've updated the .zip with patches from manne and hansfn.

Let us know if there any outstanding bugs / feature requests to improve the plugin.

@robocoder commented on March 25th 2010 Contributor

I have not seen any feedback, so I'll propose some based on my review.

Since (most of) the translateable strings used by TranslationsAdmin plugin are in core, we should use plugins/Translations/lang/ for translations being worked on by a translator. This prevents their work from being overwritten by a software update and avoids failing the file integrity check (raised in #1245).

Proposed changes:

  • add 'translationAvailable' => true to TranslationsAdmin.php
  • add a lang folder and an empty en.php file
  • save translations to the local lang folder

The user interface has some design and usability issues. The "Plugin" dropdown includes plugins that have no translateable strings. "--all translations--" can take a long time to load (e.g., 27 seconds on my test box). textareas are used indiscriminately consuming a lot of screen real estate.

Proposed changes:

  • the plugin dropdown should filter out plugins that have no translations (in en.php)
  • the language dropdown should use the language name not the ISO code; it should also exclude English
  • rows should be cycled with different background colors
  • auto-expand textareas using jquery; (a less glamorous approach: if the English translation is <= 20 chars long, use an input field; if longer, use a textarea)
  • add a checkbox (toggle) to show/hide already translated strings; alternative is to highlight untranslated strings (e.g., yellow background)

Eliminate the Languages tab.

  • add icon to "add new translation"; this will open a popup for the user to select from a list of languages not yet translated
  • add "download" and "upload" icons; use the existing Language dropdown as the selector

Translations via the UI lead to a number of inconsistencies, such as physical newline character instead of C-style "\n", trailing whitespace (see also #1212), and a mix of multi-byte UTF8 characters and HTML entities.

Proposed changes:

  • to "sort" the saved translation using the order of translations in en.php
  • translations belonging to 3rd party plugins would be appended to the end
  • convert HTML entities to the UTF8 equivalent
  • trim whitespace
  • use C-style "\n" for newlines

Lastly: Since this plugin is not a part of core, it would be nice if this could be one of the first plugins offered via the plugin repository, making it more accessible to new translators.

@mattab commented on March 26th 2010 Owner


agreed with most of your points!

Re: # add icon to "add new translation"; this will open a popup for the user to select from a list of languages not yet translated

I'm not sure about this one, I would leave the translator the freedom to create a new language (hard for us to make sure all languages are in the list, better rely on the translator to input the ISO code, english name, local name, etc.).

we should use plugins/Translations/lang/ for translations being worked on by a translator. This prevents their work from being overwritten by a software update and avoids failing the file integrity check (raised in #1245).

The advantage of the translator plugin is that translators can see their work directly in the Piwik UI, they don't need to copy paste the translation file in piwik/lang/ - I think it's better to keep the translations in piwik/lang/

An alternative way to deal with #1245 is to let all translators know (by email, or in the translator plugin?) that the file integrity fail is expected for them, and that they can ignore it.

Also, one of the issues currently with translations is multiple translators working on an update at the same time (time being a large range of several weeks), their work overwriting other's work, etc. One solution to ensure all translators always work on the latest language file version would be to install a "test" piwik install on piwik.org, that would have the translator tool installed, and have a login created for each translator. They could then easily login and modify the most up to date version of the translation. What do you think?

@robocoder commented on March 26th 2010 Contributor

re: ISO code and language names. This is just a proposal. The implementer can decide if it's doable.

re: #1245. If we keep the working-translation in piwik/lang, I would suggest that the TranslationsAdmin plugin also save a backup of theworking copy. On more than one occasion, we've received a complaint from a translator that they've lost their work. (outofscope: resolving merge conflicts)

re: "test" install. You'll have to run this past Noah and the translation team, but a centralized server for editing translations and live testing is a good idea. There would still be some logistics to work out (e.g., syncing up with svn) and allowing non-superuser access to the TranslationsAdmin plugin.

@halfdan commented on May 7th 2010 Member

Thanks mauser for the update, but please try repacking that .zip as it contains unwanted data:

Archive:  TranslationsAdmin.zip
   creating: TranslationsAdmin/
  inflating: TranslationsAdmin/.DS_Store
   creating: __MACOSX/
   creating: __MACOSX/TranslationsAdmin/
  inflating: __MACOSX/TranslationsAdmin/._.DS_Store
  inflating: TranslationsAdmin/Controller.php
  inflating: __MACOSX/TranslationsAdmin/._Controller.php
   creating: TranslationsAdmin/templates/
  inflating: TranslationsAdmin/templates/fixPermissions.tpl
   creating: __MACOSX/TranslationsAdmin/templates/
  inflating: __MACOSX/TranslationsAdmin/templates/._fixPermissions.tpl
  inflating: TranslationsAdmin/templates/languages.tpl
  inflating: __MACOSX/TranslationsAdmin/templates/._languages.tpl
  inflating: TranslationsAdmin/templates/manage.tpl
  inflating: __MACOSX/TranslationsAdmin/templates/._manage.tpl
  inflating: TranslationsAdmin/TranslationsAdmin.php
  inflating: __MACOSX/TranslationsAdmin/._TranslationsAdmin.php
@zawadzinski commented on May 7th 2010 Contributor

halfdan: Thanks for noticing. Repacked without unwanted data.

@halfdan commented on May 10th 2010 Member

THe Plugin seems to have a bug:

  • Add a new language (tr - Turkish in my case)
    -> Go to "Translations"
<a href='/0'>#0</a>  Piwik_ErrorHandler(8, Undefined index: General_OriginalLanguageName, /var/www/htdocs/piwik.c0demonkey.com/html/plugins/LanguagesManager/API.php, 115, Array ([filenames] =&gt; Array ([0] =&gt; am,[1] =&gt; be,[2] =&gt; bg,[3] =&gt; ca,[4] =&gt; cs,[5] =&gt; da,[6] =&gt; de,[7] =&gt; el,[8] =&gt; en,[9] =&gt; en3,[10] =&gt; es,[11] =&gt; et, ...

The problem obviously is, that adding a language only creates an empty $translations array. But when loading the languages the Plugin tries to read the index General_OriginalLanguageName.

I added a small patch that can be applied to the current version.

@mattab commented on July 20th 2010 Owner

(In [2598]) * Updated Greek, German, Chinese translation
Refs #5591

  • Added test to check same number of %s in translations as in English. Writes the cleaned up file (without erroneous strings) in /tmp/ which are then easy to paste into /langs/ to pass the test, and ensure piwik doesn't break when used in any language.
    It would be nice if the Translation plugin was also doing this test :) (See LanguagesManager.test.php)
@halfdan commented on July 24th 2010 Member

Attachment fixes issue with 0.6.4 (top_bar.tpl was producing an error).

New feature: Dynamic filtering for empty textfields (using jQuery). Useful if only a few of thousand translations are missing.

@mattab commented on August 6th 2010 Owner

Bug report: the plugin seems to write setlocale(LC_TIME, 'nn_NO.UTF8'); in top of files but it shouldn't, as the setLocale is done by LanguagesManager

@mattab commented on August 14th 2010 Owner

Bug report from email: Hi! there is some problem with translation plugin. When i submit form, i see login page instead of staying on the same page. But i'm not logged out, because i can return to TranslationAdmin by typing URL without need to relogin and submitted translations are stored as should be.

@mattab commented on January 3rd 2011 Owner

(In [3566]) * adding two new languages: Hebrew and Indonesian

  • updating many more
  • Removing line breaks from language translations
    Refs #5591
@mattab commented on February 10th 2011 Owner

It appears there is a bug when creating a new language: http://forum.piwik.org/read.php?2,72160 - work around is to create the file manually.

@robocoder commented on March 24th 2011 Contributor

I've fixed the issues in comment:47 and comment:52 in my repo, and will attach an update after I figure out comment:48. (I might include some other improvements while I'm at it.)

(I was also thinking of commiting it into Piwik's svn, and modifying the build script to exclude it, but I'll probably use this as a test case for CI of external plugins.)

@robocoder commented on March 28th 2011 Contributor

(In [4209]) fixes #2229, refs #5591 - TranslationWriter contains refactored saveTranslation code; also added unit tests

@robocoder commented on March 28th 2011 Contributor

I've attached the updated plugin using the refactored code in trunk. It is not compatible with Piwik 1.2.1 or earlier.


  • comment:47 - bug: writes setlocale() to the translation file
  • comment:48 - bug: redirects to Login when clicking on Save button
  • comment:52 - bug: "undefined index"
  • cleaned up the 'Add language/Export/Import' page
  • added UI/logic to set the language region when adding a new language
  • buttons are now consistent with the rest of the Piwik UI
@anonymous-piwik-user commented on April 23rd 2011

Found an issue with Piwik 1.3 using TA 1.2.2:

Trying to export an Language:

Fatal error: Class 'Piwik_Languages_Manager' not found in /www/vhosts/piwik.fubar.com/htdocs/piwik/plugins/TranslationsAdmin/Controller.php on line 403

I'll be happy to test any patches provided.

@robocoder commented on April 23rd 2011 Contributor

Thanks morefx. I've uploaded an updated package.

@robocoder commented on April 23rd 2011 Contributor

(In [4541]) refs #5591 - refactor for TranslationsAdmin exportLanguage

@robocoder commented on April 23rd 2011 Contributor

Updated for trunk. If you're running vanilla Piwik 1.3, you'll also need this file: https://github.com/piwik/piwik/blob/master/4541/trunk/core/TranslationWriter.php

@anonymous-piwik-user commented on April 23rd 2011

Thanx vipsoft for the quick update. Works!

Just for the record:
With Piwik 1.3 you have to replace the existing TranslationWriter.php in the core directory - just a clarification to avoid an obvious question ;-)

@mattab commented on November 15th 2011 Owner

Updated the translations plugin for Piwik 1.6 (removed language import feature)

@mattab commented on March 11th 2013 Owner

From now on all translations should be done in : http://translations.piwik.org/

please register there. See also: http://piwik.org/translations/

This Issue was closed on March 11th 2013
Powered by GitHub Issue Mirror