my ($type, $country, $NLS_file) = @_;
my $self = {};
- %self = ();
if ($country && -d "locale/$country") {
+ local *IN;
$self->{countrycode} = $country;
- eval { require "locale/$country/$NLS_file"; };
+ if (open(IN, "locale/$country/$NLS_file")) {
+ my $code = join("", <IN>);
+ eval($code);
+ close(IN);
+ }
}
$self->{NLS_file} = $NLS_file;
sub text {
my ($self, $text) = @_;
- return (exists $self{texts}{$text}) ? $self{texts}{$text} : $text;
+ return (exists $self->{texts}{$text}) ? $self->{texts}{$text} : $text;
}
sub findsub {
my ($self, $text) = @_;
- if (exists $self{subs}{$text}) {
- $text = $self{subs}{$text};
+ if (exists $self->{subs}{$text}) {
+ $text = $self->{subs}{$text};
} else {
if ($self->{countrycode} && $self->{NLS_file}) {
Form->error(
-$self{texts} = {
+$self->{texts} = {
'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
'Database update error:' => 'Fehler beim Datenbankupgrade:',
'The base unit does not exist.' => 'Die Basiseinheit existiert nicht.',
'The unit has been saved.' => 'Die Einheit wurde gespeichert.',
};
-$self{subs} = {
+$self->{subs} = {
'mydberror' => 'mydberror',
'myshowerror' => 'myshowerror',
'update_units' => 'update_units',
-$self{texts} = {
+$self->{texts} = {
'Database update error:' => 'Fehler beim Datenbankupgrade:',
};
-$self{subs} = {
+$self->{subs} = {
'look_for_accno' => 'look_for_accno',
'mydberror' => 'mydberror',
'myshowerror' => 'myshowerror',
-$self{texts} = {
+$self->{texts} = {
'Database update error:' => 'Fehler beim Datenbankupgrade:',
};
-$self{subs} = {
+$self->{subs} = {
'create_standard_buchungsgruppen' => 'create_standard_buchungsgruppen',
'create_standard_buchungsgruppen_skr03' => 'create_standard_buchungsgruppen_skr03',
'create_standard_buchungsgruppen_skr04' => 'create_standard_buchungsgruppen_skr04',
-$self{texts} = {
+$self->{texts} = {
'Access Control' => 'Zugriffkontrolle',
'Add User' => 'Benutzer erfassen',
'Address' => 'Adresse',
'website' => 'Webseite',
};
-$self{subs} = {
+$self->{subs} = {
'add_user' => 'add_user',
'adminlogin' => 'adminlogin',
'change_admin_password' => 'change_admin_password',
# you can add the translation in this file or in the 'missing' file
# run locales.pl from this directory to rebuild the translation files
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
' Number' => ' Nummer',
' Part Number missing!' => ' Artikelnummer fehlt!',
-$self{texts} = {
+$self->{texts} = {
'1000,00 or 1000.00' => '1000,00 oder 1000.00',
'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
'AP' => 'Einkauf',
'service units' => 'Dienstleistungseinheiten',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'account_header' => 'account_header',
'add' => 'add',
-$self{texts} = {
+$self->{texts} = {
'AP Transaction' => 'Kreditorenbuchung',
'AP Transactions' => 'Kreditorenbuchungen',
'Account' => 'Konto',
'button' => '?',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'AR Transaction' => 'Debitorenbuchung',
'AR Transactions' => 'Debitorenbuchungen',
'Account' => 'Konto',
'button' => '?',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Address' => 'Adresse',
'Continue' => 'Weiter',
'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
};
-$self{subs} = {
+$self->{subs} = {
'add_transaction' => 'add_transaction',
'ap_transaction' => 'ap_transaction',
'ar_transaction' => 'ar_transaction',
-$self{texts} = {
+$self->{texts} = {
'Account' => 'Konto',
'Accounting Menu' => 'Kontoverwaltung',
'Are you sure you want to remove the marked entries from the queue?' => 'Sind Sie sicher, dass die markierten Einträge von der Warteschlange gelöscht werden sollen?',
'done' => 'erledigt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'continue' => 'continue',
'display' => 'display',
-$self{texts} = {
+$self->{texts} = {
'Account' => 'Konto',
'Apr' => 'Apr',
'April' => 'April',
'To' => 'An',
};
-$self{subs} = {
+$self->{subs} = {
'ca_subtotal' => 'ca_subtotal',
'chart_of_accounts' => 'chart_of_accounts',
'list' => 'list',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
'*/' => '*/',
'Account' => 'Konto',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Address' => 'Adresse',
'Customer Number' => 'Kundennummer',
'Enter longdescription' => 'Langtext eingeben',
'Variable' => 'Variable',
};
-$self{subs} = {
+$self->{subs} = {
'calculate_qty' => 'calculate_qty',
'delivery_customer_selection' => 'delivery_customer_selection',
'employee_selection_internal' => 'employee_selection_internal',
-$self{texts} = {
+$self->{texts} = {
'AP' => 'Einkauf',
'AR' => 'Verkauf',
'Account' => 'Konto',
'button' => '?',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add_transaction' => 'add_transaction',
'ap_transaction' => 'ap_transaction',
-$self{texts} = {
+$self->{texts} = {
' Number' => ' Nummer',
'Abteilung' => 'Abteilung',
'Account Number' => 'Kontonummer',
's' => 's',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Abrechnungsnummer' => 'Abrechnungsnummer',
'April' => 'April',
'August' => 'August',
'bis' => 'bis',
};
-$self{subs} = {
+$self->{subs} = {
'continue' => 'continue',
'export' => 'export',
'export2' => 'export2',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
'*/' => '*/',
'Accounting Menu' => 'Kontoverwaltung',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Address' => 'Adresse',
'Angaben zum Finanzamt' => 'Angaben zum Finanzamt',
'Bankleitzahl (BLZ)' => 'Bankleitzahl (BLZ)',
'Öffnungszeiten' => 'Öffnungszeiten',
};
-$self{subs} = {
+$self->{subs} = {
'add_transaction' => 'add_transaction',
'ap_transaction' => 'ap_transaction',
'ar_transaction' => 'ar_transaction',
-$self{texts} = {
+$self->{texts} = {
'AP Transaction' => 'Kreditorenbuchung',
'AR Transaction' => 'Debitorenbuchung',
'Account' => 'Konto',
'button' => '?',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
' Part Number missing!' => ' Artikelnummer fehlt!',
'*/' => '*/',
'soldtotal' => 'Verkaufte Anzahl',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'addtop100' => 'addtop100',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
'*/' => '*/',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'check_form' => 'check_form',
'customer_details' => 'customer_details',
'display_form' => 'display_form',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
' Payment posted!' => 'Zahlung gebucht!',
'*/' => '*/',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
' Payment posted!' => 'Zahlung gebucht!',
'*/' => '*/',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Logout' => 'Abmeldung',
};
-$self{subs} = {
+$self->{subs} = {
};
1;
-$self{texts} = {
+$self->{texts} = {
'Add' => 'Erfassen',
'Add License' => 'Lizenz erfassen',
'All' => 'Alle',
'Zipcode' => 'PLZ',
};
-$self{subs} = {
+$self->{subs} = {
'add' => 'add',
'continue' => 'continue',
'details' => 'details',
foreach $text (keys %$missing) {
if ($locale{$text} || $htmllocale{$text}) {
- unless ($self{texts}{$text}) {
- $self{texts}{$text} = $missing->{$text};
+ unless ($self->{texts}{$text}) {
+ $self->{texts}{$text} = $missing->{$text};
}
}
}
open FH, ">$file" or die "$! : $file";
- print FH q|$self{texts} = {
+ print FH q|$self->{texts} = {
|;
foreach $key (sort keys %locale) {
- if ($self{texts}{$key}) {
- $text = $self{texts}{$key};
+ if ($self->{texts}{$key}) {
+ $text = $self->{texts}{$key};
} else {
$text = $key;
}
print FH q|};
-$self{subs} = {
+$self->{subs} = {
|;
foreach $key (sort keys %subrt) {
}
foreach $key (sort keys %submit) {
- $text = ($self{texts}{$key}) ? $self{texts}{$key} : $key;
+ $text = ($self->{texts}{$key}) ? $self->{texts}{$key} : $key;
$text =~ s/'/\\'/g;
$text =~ s/\\$/\\\\/;
# you can add the translation in this file or in the 'missing' file
# run locales.pl from this directory to rebuild the translation files
-$self{texts} = {
+$self->{texts} = {
|;
foreach $key (sort keys %alllocales) {
- $text = $self{texts}{$key};
+ $text = $self->{texts}{$key};
$count++;
$copying = 0;
$alllocales{$text} = 1;
$htmllocale{$text} = 1;
- print(OUT $self{"texts"}{$text} || $text);
+ print(OUT $self->{"texts"}{$text} || $text);
print(OUT "\n") if ("" eq $line);
$text = "";
-$self{texts} = {
+$self->{texts} = {
'About' => 'über',
'Database Host' => 'Datenbankcomputer',
'Dataset' => 'Datenbank',
'localhost' => 'lokaler Rechner',
};
-$self{subs} = {
+$self->{subs} = {
'company_logo' => 'company_logo',
'login' => 'login',
'login_screen' => 'login_screen',
-$self{texts} = {
+$self->{texts} = {
'AP' => 'Einkauf',
'AP Aging' => 'Offene Verbindlichkeiten',
'AR' => 'Verkauf',
'Version' => 'Version',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'display' => 'display',
'section_menu' => 'section_menu',
-$self{texts} = {
+$self->{texts} = {
'AP' => 'Einkauf',
'AP Aging' => 'Offene Verbindlichkeiten',
'AR' => 'Verkauf',
'Version' => 'Version',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'clock_line' => 'clock_line',
'display' => 'display',
-$self{texts} = {
+$self->{texts} = {
' Date missing!' => ' Datum fehlt!',
' missing!' => ' fehlt!',
'*/' => '*/',
'sent to printer' => 'an Drucker geschickt',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
-$self{texts} = {
+$self->{texts} = {
'Accounting Menu' => 'Kontoverwaltung',
'Add' => 'Erfassen',
'Add Group' => 'Warengruppe erfassen',
'Save' => 'Speichern',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add' => 'add',
'continue' => 'continue',
-$self{texts} = {
+$self->{texts} = {
'Account' => 'Konto',
'Accounting Menu' => 'Kontoverwaltung',
'Balance' => 'Bilanz',
'Update' => 'Erneuern',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'continue' => 'continue',
'display' => 'display',
-$self{texts} = {
+$self->{texts} = {
'AP Aging' => 'Offene Verbindlichkeiten',
'AR Aging' => 'Offene Forderungen',
'Account' => 'Konto',
'winston_export' => 'Winston-Export',
};
-$self{subs} = {
+$self->{subs} = {
'acc_menu' => 'acc_menu',
'add_transaction' => 'add_transaction',
'aging' => 'aging',
-$self{texts} = {
+$self->{texts} = {
'1. Quarter' => '1. Quartal',
'2. Quarter' => '2. Quartal',
'3. Quarter' => '3. Quartal',
'Öffnungszeiten' => 'Öffnungszeiten',
};
-$self{subs} = {
+$self->{subs} = {
'add_transaction' => 'add_transaction',
'ap_transaction' => 'ap_transaction',
'ar_transaction' => 'ar_transaction',