- HTML Admin-Manual
- PDF Admin-Manual
- HTML ITSM-Manual
- PDF ITSM-Manual
- HTML Developer-Manual
- PDF Developer-Manual
- HTML Developer-API
Chapter 10. Language Translations
The OTRS framework allows for different languages to be used in the frontend.
10.1. How it works
There are three different translation file types which are used in the following order. If a word/sentence is redefined in a translation file, the latest definition will be used.
Default Framework Translation File
Kernel/Language/$Language.pm
Frontend Module Translation File
Kernel/Language/$Language_$FrontendModule.pm
Custom Translation File
Kernel/Language/$Language_Custom.pm
10.1.1. Default Framework Translation File
The Default Framework Translation File includes the basic translations. The following is an example of a Default Framework Translation File.
Format:
# --
# Kernel/Language/de.pm - provides de language translation
# Copyright (C) 2001-2006 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: language-translations.xml,v 1.10 2006/04/02 23:25:09 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::de;
use strict;
use vars qw($VERSION);
$VERSION = '$Revision: 1.10 $';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# --
sub Data {
my $Self = shift;
my %Param = @_;
# $$START$$
# possible charsets
$Self->{Charset} = ['iso-8859-1', 'iso-8859-15', ];
# date formats (%A=WeekDay;%B=LongMonth;%T=Time;%D=Day;%M=Month;%Y=Jear;)
$Self->{DateFormat} = '%D.%M.%Y %T';
$Self->{DateFormatLong} = '%A %D %B %T %Y';
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Translation} = {
# Template: AAABase
'Yes' => 'Ja',
'No' => 'Nein',
'yes' => 'ja',
'no' => 'kein',
'Off' => 'Aus',
'off' => 'aus',Kernel/Language/$Language_Custome.pm
};
# $$STOP$$
}
# --
1;
10.1.2. Frontend Translation File
The Frontend Translation File is used for a specific frontend module. If, for example, the frontend module "Kernel/Modules/AgentCalendar.pm", also http://otrs.example.com/otrs/index.pl?Action=AgentCalendar, is used, the Frontend Translation File "Kernel/Language/de_Agentcalendar.pm" is used, too.
Format:
# --
# Kernel/Language/de_AgentCalendar.pm - provides de language translation
# Copyright (C) 2001-2006 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: language-translations.xml,v 1.10 2006/04/02 23:25:09 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::de_AgentCalendar;
use strict;
sub Data {
my $Self = shift;
$Self->{Translation}->{'CW'} = 'KW';
$Self->{Translation}->{'Today'} = 'heute';
$Self->{Translation}->{'Tomorrow'} = 'Morgen';
$Self->{Translation}->{'1 St. May'} = 'Erster Mai';
$Self->{Translation}->{'Christmas'} = 'Weihnachten';
$Self->{Translation}->{'Silvester'} = 'Silvester';
$Self->{Translation}->{'New Year\'s Eve!'} = 'Neu Jahr!';
$Self->{Translation}->{'January'} = 'Januar';
$Self->{Translation}->{'February'} = 'Februar';
}
1;
10.1.3. Custom Translation File
The Custom Translation File is read out last and so its translation which will be used. If you want to add your own wording to your installation, create this file for your language.
Format:
# --
# Kernel/Language/xx_Custom.pm - provides xx custom language translation
# Copyright (C) 2001-2006 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: language-translations.xml,v 1.10 2006/04/02 23:25:09 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::xx_Custom;
use strict;
use vars qw($VERSION);
$VERSION = '$Revision: 1.10 $';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# --
sub Data {
my $Self = shift;
my %Param = @_;
# $$START$$
# own translations
$Self->{Translation}->{'Lock'} = 'Lala';
$Self->{Translation}->{'Unlock'} = 'Lulu';
# $$STOP$$
}
# --
1;

