Chapter 8. Language translations

The OpenTRS webfrontend supports different frontend languages. The language translation files are located under Kernel/Language/*.pm.

New translation files

If you want to translate OpenTRS in a new language, you have to do five steps:

Now you can select the new language in your preferences screen.

Example 8-1. Kernel/Language/German.pm - Old file

# --
# German.pm - provides german languag translation
# Copyright (C) 2001-2002 Martin Edenhofer (martin+code at otrs.org)
# --
# $Id: language-translation.sgml,v 1.2 2002/05/11 16:36:25 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
package Kernel::Language::German;

use strict;

use vars qw($VERSION);
$VERSION = '$Revision: 1.2 $';
$VERSION =~ s/^.*:\s(\d+\.\d+)\s.*$/$1/;

# --
sub Data {
    my $Self = shift;
    my %Param = @_;

    # some common words
    $Self->{Lock} = 'Ziehen';
    $Self->{Unlock} = 'Freigeben';
    $Self->{unlock} = 'freigeben';
    $Self->{Zoom} = 'Inhalt';
    $Self->{History} = 'History';
    $Self->{'Add Note'} = 'Notiz anheften';

[...]

To:

Example 8-2. Kernel/Language/French.pm - New file

# --
# French.pm - provides french language translations
# Copyright (C) 2002 Martin Scherbaum (maddin at exsuse.de)
# --
# $Id: language-translation.sgml,v 1.2 2002/05/11 16:36:25 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
package Kernel::Language::French;

use strict;

use vars qw($VERSION);
$VERSION = '$Revision: 1.2 $';
$VERSION =~ s/^.*:\s(\d+\.\d+)\s.*$/$1/;

# --
sub Data {
    my $Self = shift;
    my %Param = @_;

    # some common words
    $Self->{Lock} = 'Tirer';
    $Self->{Unlock} = 'Rendre';
    $Self->{unlock} = 'rendre';
    $Self->{Zoom} = 'Contenu';
    $Self->{History} = 'Histoire';
    $Self->{'Add Note'} = 'Ajouter commentaire';

[...]