Skip to content

Localisation not working #2

@runarbu

Description

@runarbu

I am trying out your module. Appear to work great for english, but I can not get the localisation function to work. Is there some spesial trick I have to do?

I did try your example code:

#!/usr/bin/env perl

use strict;
use warnings;
use open qw/ :std :utf8 /;
use POSIX ':locale_h';
use Time::Ago;

my $secs = 86400 * 365 * 10.4;

foreach (qw/ en fr de it ja ru es /) {
  setlocale(LC_ALL, '');
  $ENV{LANGUAGE} = $_;
  print Time::Ago->in_words(86400 * 365 * 10.4), "\n";
}

Running it gives me only unlocalised text like this:

over 10 years
over 10 years
over 10 years
over 10 years
over 10 years
over 10 years
over 10 years

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions