Giter Site home page Giter Site logo

Locale problem about anjlab-widgets HOT 6 CLOSED

anjlab avatar anjlab commented on June 12, 2024
Locale problem

from anjlab-widgets.

Comments (6)

yury avatar yury commented on June 12, 2024

There are two places to add locale

  1. Server side https://github.com/anjlab/anjlab-widgets/blob/master/lib/anjlab-widgets.rb#L7
  2. Client side https://github.com/anjlab/anjlab-widgets/blob/master/app/assets/javascripts/anjlab/datepicker.js.coffee#L2

On client side we detect locale by <html lang> attribute. On server side by ::I18n.default_locale (and configured here https://github.com/anjlab/anjlab-widgets/blob/master/spec/dummy/config/application.rb#L35) in both cases we fallback to en

Right now it hardcoded. But any PR are welcome.

from anjlab-widgets.

thotmx avatar thotmx commented on June 12, 2024

I'm trying to add another translation to your gem, but I've some problems, I've changed the code that you show me, but don't use my locale.

I don't understand what I'm missing.

Thanks a lot for your response.

from anjlab-widgets.

yury avatar yury commented on June 12, 2024

Ok, I updated dummy app in your fork.

https://gist.github.com/yury/31db37c329bca7acd53e

go to spec/dummy and start rails app (rails s)

open /datepicker

check 4-th picker. It fallbacks to default location. http://cl.ly/image/0G1A0X3M3A1x

from anjlab-widgets.

thotmx avatar thotmx commented on June 12, 2024

Ok, Maybe I've another problem with my application where this change doesn't work. Thanks a lot for your support.

from anjlab-widgets.

yury avatar yury commented on June 12, 2024

Please be free to make PR with es locale.
Thank you

from anjlab-widgets.

thotmx avatar thotmx commented on June 12, 2024

Of course, I'll make the PR when my app works. Thanks a lot for your hard work on this gem.

from anjlab-widgets.

Related Issues (17)

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.