Giter Club home page Giter Club logo

Comments (11)

shioyama avatar shioyama commented on May 12, 2024

This is really a question for SO, but just quickly: Mobility.locale is not the same as I18n.locale. Setting Mobility.locale will take effect for Mobility stuff, but not for stuff that's looking at I18n.locale since that locale does not change.

If you want to change the I18n locale, you need to use I18n.with_locale(:de). If Mobility.locale is nil, then Mobility will also default to I18n.locale.

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

You're right, I wasn't aware of this difference. I'm sorry for polluting your issues tracker. Next time I'll ask on SO. 👍

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

(Thanks though!)

from mobility.

shioyama avatar shioyama commented on May 12, 2024

No worries! The readme could be clearer about this.

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

PS: I18n.with_locale :de { ... } doesn't seem to work either. Maybe it's running in a different thread or something...?

from mobility.

shioyama avatar shioyama commented on May 12, 2024

I think you need do/end for that to work.

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

I did... I just replaced it with curly braces to make a one-liner here. 😅

from mobility.

shioyama avatar shioyama commented on May 12, 2024

hmm not really sure, you mean mobility is not showing translations in German?

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

No, the Rails routing mechanism still sent me to the english page.

from mobility.

shioyama avatar shioyama commented on May 12, 2024

Well, that's really not a Mobility issue at all...

from mobility.

jmuheim avatar jmuheim commented on May 12, 2024

Exactly. Just wanted to point it out here for someone else coming from Google or so... 👍

from mobility.

Related Issues (20)

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.