# Dictionary template generated Wed, 04 Dec 2019 13:37:00 GMT
# Based on Mojolicious::Plugin::Number::Commify
my $THOUSAND_SEP_RE = qr/(
  ^[-+]?           # beginning of number.
  \d+?             # first digits before first comma
  (?=              # followed by, (but not included in the match) :
    (?>(?:\d{3})+) # some positive multiple of three digits.
    (?!\d)         # an *exact* multiple, not x * 3 + 1 or whatever.
  )|               # or:
  \G\d{3}          # after the last group, get three digits
  (?=\d)           # but they have to have more digits after them.
)/x;

{
   _ => sub { $_->locale },
  de => {
    numf => sub {
      shift;
      my %val = @_;
      my $num = $val{number} or return 0;
      $num =~ s/$THOUSAND_SEP_RE/$1\./g;
      return $num;
    },
    Cancel => 'Abbrechen',
    Apply => 'Anwenden',
    Options => 'Optionen',
    SEARCH => 'SUCHE',
    words_to_be_searched => 'Zu suchende Wortform(en)',
    search_description => 'Wenn sie mehrere Wortformen kontrastieren wollen, trennen Sie diese mit Leerzeichen, um um den Mittelpunkt der Alternativen herum nach ähnlichen Wörtern zu suchen und mit "|", um die Nachbarn zu allen angegebenen Wortformen zur erhalten.',
    paradigmatic_tsne => 'Paradigmatisch (t-SNE)',
    paradigmatic_som => 'Paradigmatisch (SOM)',
    syntagmatic =>  'Syntagmatisch',
    collocate_w2v => "Kollokat (W2V)",
    collocate_ca => "Kollokat (KA)",
    af_window => "AF-Fenster"
  },
  -en => {
    numf => sub {
      shift;
      my %val = @_;
      my $num = $val{number} or return 0;
      $num =~ s/$THOUSAND_SEP_RE/$1\,/g;
      return $num;
    },
    Cancel => 'Cancel',
    Apply => 'Apply',
    Options => 'Options',
    SEARCH => 'SEARCH',
    words_to_be_searched => 'Word(s) to be searched',
    search_description => 'When looking for multiple words use spaces as separators to search around the average vector and | as separator to get the neighbours for each word.',
    paradigmatic_tsne => 'Paradigmatic (t-SNE)',
    paradigmatic_som => 'Paradigmatic (SOM)',
    syntagmatic =>  'Syntagmatic',
    collocate_w2v => "Collocate (W2V)",
    collocate_ca => "Collocate (CA)",
    af_window => "AF window"
  }
};
