GithubHelp home page GithubHelp logo

dancer-i18n's People

Contributors

marr avatar

Watchers

 avatar

dancer-i18n's Issues

Not seeing Accept-Language headers change the language.

Using chrome, I change the languages to have an en_CA header and I have a custom messages.{mo,po} file within the en_CA dir. I don't see the plugin serving the correct locale, it always seems to fall back to en_US.

I am using the Dancer::Plugin::Locale plugin which contains Dancer::Plugin::Locale:: TextDomain and Dancer::Plugin::Locale::TextDomain.

My headers look like:
Accept-Language: en-CA,en;q=0.8,en-US;q=0.6

And here is a strace:

open_nocancel("/usr/share/locale/en_US.UTF-8/LC_CTYPE\0", 0x0, 0x1B6) = 3 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MONETARY\0", 0x0, 0x0) = 3 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_NUMERIC\0", 0x0, 0x0) = 3 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_TIME\0", 0x0, 0x0) = 3 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/LC_MESSAGES\0", 0x0, 0x0) = 3 0
open_nocancel("/usr/share/locale/en_US.UTF-8/LC_COLLATE\0", 0x0, 0x1B6) = 3 0
open_nocancel("/usr/share/locale/en/LC_COLLATE\0", 0x0, 0x1B6) = -1 Err#2
open_nocancel("/usr/share/locale/EN/LC_COLLATE\0", 0x0, 0x1B6) = -1 Err#2
stat64("locale\0", 0x10DA94AA8, 0x0) = 0 0
stat64("locale\0", 0x10DA94AA8, 0x0) = 0 0
lstat64("/Users/dmarr/Projects/Dancer-I18N/locale\0", 0x7FFF52296330, 0x0) = 0 0
open_nocancel("/Users/dmarr/Projects/Dancer-I18N/locale\0", 0x1100004, 0xFFFFFFFFFFFFFFF0) = 6 0
stat64("/Users/dmarr/Projects/Dancer-I18N/locale/.DS_Store/LC_MESSAGES/messages.mo\0", 0x10DA94AA8, 0x0) = -1 Err#20
lstat64("/Users/dmarr/Projects/Dancer-I18N/locale/.DS_Store/LC_MESSAGES/messages.mo\0", 0x10DA94AA8, 0x0) = -1 Err#20
stat64("/Users/dmarr/Projects/Dancer-I18N/locale/en_CA/LC_MESSAGES/messages.mo\0", 0x10DA94AA8, 0x0) = 0 0
open_nocancel("/opt/local/share/locale/locale.alias\0", 0x0, 0x1B6) = -1 Err#2
open("/Users/dmarr/Projects/Dancer-I18N/locale/en_US.UTF-8/LC_MESSAGES/messages.mo\0", 0x0, 0x0) = -1 Err#2
open("/Users/dmarr/Projects/Dancer-I18N/locale/en_US.utf8/LC_MESSAGES/messages.mo\0", 0x0, 0x0) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_COLLATE\0", 0x0, 0x1B6) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_CTYPE\0", 0x0, 0x1B6) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_MONETARY\0", 0x0, 0x0) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_NUMERIC\0", 0x0, 0x0) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_TIME\0", 0x0, 0x0) = 6 0
open_nocancel("/usr/share/locale/en_CA/LC_MESSAGES/LC_MESSAGES\0", 0x0, 0x0) = 6 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.