Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localisation not working #2

Open
runarbu opened this issue Nov 16, 2015 · 1 comment
Open

Localisation not working #2

runarbu opened this issue Nov 16, 2015 · 1 comment

Comments

@runarbu
Copy link

runarbu commented Nov 16, 2015

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
@mla
Copy link
Owner

mla commented Jul 14, 2016

Hey there! Sorry for the extreme delay in responding. I moved and totally missed this.

And I'm afraid I have no idea why it isn't working for you. What perl are you running? I just tried it again with 5.18.1 and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants