Comments (11)
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.
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.
(Thanks though!)
from mobility.
No worries! The readme could be clearer about this.
from mobility.
PS: I18n.with_locale :de { ... }
doesn't seem to work either. Maybe it's running in a different thread or something...?
from mobility.
I think you need do/end
for that to work.
from mobility.
I did... I just replaced it with curly braces to make a one-liner here. 😅
from mobility.
hmm not really sure, you mean mobility is not showing translations in German?
from mobility.
No, the Rails routing mechanism still sent me to the english page.
from mobility.
Well, that's really not a Mobility issue at all...
from mobility.
Exactly. Just wanted to point it out here for someone else coming from Google or so...
from mobility.
Related Issues (20)
- Error when ordering and selecting distinct on translated resource HOT 2
- Marks object as dirty even if nothing was changed in RichTextTranslation fields HOT 5
- Cache issue with JSONb (+locale_accessors) & ActiveRecord HOT 2
- Using a query method block does not automatically scope to i18n HOT 1
- Translated inputs are empty after failed form validation in a specific setup HOT 1
- Automatic ActionText `rich_text` detection failing when operating on locale-dependent mobility field HOT 1
- Any accepted way to store images working with active storage ? HOT 1
- Unique Validation didn't work with locale_accessors on every locales HOT 1
- Not compatible with FastGettext - request for string available locale support HOT 2
- Error when installing on Vitess MySQL db HOT 4
- The presence plugin doesn't work as expected HOT 1
- Destruction of record+translations fails, when model IDs are of the type "varchar(36)" (a UUID string) HOT 3
- accessor super method doesn't work with arguments like class.value(locale: :de) HOT 1
- ordering by specific locale HOT 2
- Add type checking plugin reference HOT 3
- eager_load and pluck builds the wrong query HOT 1
- `i18n` scope incompatible with `exists?` HOT 1
- validates presence: true failing with cache active HOT 3
- Empty content row is created in translation table. HOT 1
- No fixtures are generated / No doc on how to make them ourselves HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobility.