[Piwik-trac] [Piwik] #62: Making piwik translation ready

Piwik trac at piwik.org
Fri Apr 11 22:25:38 CEST 2008


#62: Making piwik translation ready
--------------------+-------------------------------------------------------
  Reporter:  matt   |       Owner:                                                 
      Type:  Task   |      Status:  new                                            
  Priority:  major  |   Milestone:  Stable release                                 
 Component:  Core   |     Version:                                                 
Resolution:         |    Keywords:  i18n translation translate internationalization
--------------------+-------------------------------------------------------
Comment (by mauser):

 Idea for columns translations interface:

 in Controller.php add
 {{{
 $view = Piwik_ViewDataTable::factory();
 (...)
 $view->setColumnsToDisplay( array('label','nb_visits') );
 $view->setColumnTranslation('label', 'Referers_ColumnLabel');
 $view->setColumnTranslation('label', 'General_ColumnNbVisits');
 }}}

 or maybe even better assigning translated string:
 {{{
 $view->setColumnTranslation('label',
 Piwik_Translate('General_ColumnNbVisits'));
 }}}

 Then change modules/ViewDataTable so they pass translated strings values
 to templates (if translation does exist, in other case translated string =
 column name).

 And change templates so instead of column names display translated labels.

 I tried to find a place where it can break widgets (e.g. sorting, paging)
 but didn't find anything... maybe I haven't noticed sth?

-- 
Ticket URL: <http://dev.piwik.org/trac/ticket/62#comment:20>
Piwik <http://piwik.org>
Piwik, open source web analytics software


More information about the Piwik-trac mailing list