Comments (12)
Damn! I also wonder how to enable I18n Fallbacks. Please someone help us out!
from globalize2.
i delete the joshmh/globalize2 and took the OLD one from fd/globalize2.
guess what! whit this one I don't get anny error!
the only thing is, that the specified fallback language won't get retrieved, so it's always falling back on english even if I said german.
anyways, can someone explain, how come that the NEWER joshmh/globalize2 ain't working? :-(
from globalize2.
i gave it a new shot:
sudo script/plugin install git://github.com/hukl/globalize2
ain't working either:
ActionView::TemplateError (undefined method `fallbacks' for I18n:Module) on line #1 of app/views/posts/index.html.erb:
1: <%- I18n.fallbacks[:de] %>
from globalize2.
So, I wanna share my latest bad news with you.
I've been trying some older versions of the Globalize2 plugin and they seem to have no problem with the fallbacks method. However, they all have some severe problems with form_for, hash building and some other very strange stuff which makes my current apllication break apart. Sadly.
Nobody has a statement what can be done here? How can I make following to work?
I18n.fallbacks.inspect ---> undefined method fallbacks I18n:Module
@posts.each do |post|
post.title.fallback? ---> undefined method fallback?' for nil:NilClass post.title.locale.to ---> undefined method
locale' for nil:NilClass
end
Don't wanna repeat myself, but those method calls DO work previous to 0.2.0. :-)
So, what am I doing wrong?
@fillman: Your Globalize2 version is also a 0.1.1 version which actually work with fallback but crashes on form_for and other stuff.
from globalize2.
A sample of what older versions (i.e.0.1.1) prior 0.2.0 produce:
ArgumentError in Pages#new
Showing app/views/pages/_form.html.erb where line #6 raised:
"odd number of arguments for Hash"
Extracted source (around line #6):
5: <%- form_for @page do |f| %>
6: <%= f.error_messages %>
etc.
As soon as I remove the plugin, restart the server, all is fine. So I guess the plugin interferres with Rails so deep, that it actually does its purpose for globalizing but also mixes up some other stuff. :-/
from globalize2.
I wanna quote Sven Fuchs: "Big refactoring towards version 0.2.0. Stripping off all features that have been duplicated in I18n. Only model translations related features
will remain in Globalize2."
Ok, no problem with that. But can you tell us what's the alternative for the "fallback?" method ?? Otherwise 0.2.0 is a total downgrade. So where is the point?
from globalize2.
Well, i am also pulling my hair out about this. Globalize2 is great, but its documentation is more than poor. It seems you need to install the I18n plugin to get the locale fallbacks back. See here: http://stackoverflow.com/questions/2147179/how-to-enable-fallback-in-i18n-with-globalize2
This is quite confusing. I wish there would be some overview page clearly explaining when to use what and what for (Globalize2, I18n Gem,...). And of cause a good documentation of G2.
from globalize2.
Anything new on this?
from globalize2.
what u wanna know?
from globalize2.
Actually I can't make Globalize2 work in my App, and in the Sample App, it's failing on fallbacks. A sample app failing it's kind of uncool :)
from globalize2.
Any body got fallbacks working? See also this post:
http://github.com/svenfuchs/i18n/issues/#issue/11
from globalize2.
just take a look here:
http://stackoverflow.com/questions/2147179/how-to-enable-fallback-in-i18n-with-globalize2
it worked smoothly for me.
from globalize2.
Related Issues (20)
- Work as a gem HOT 3
- [PATCH] Globalize2 broken in Rails 3.0 RC HOT 4
- Globalize doesn't allow migration to run HOT 3
- Attribute query methods
- i18n content, not UI
- Temporary disable using translations HOT 1
- the attributes= writer modifies its argument
- Warning regarding class_name HOT 1
- Why not add batch translation and validations into globalize2
- Why not add batch translation and validations into globalize2
- How to delete a translation? HOT 2
- Problem passing migrations globalize2
- problem to copy fields that contains "carrier return"
- Quering on a model with translated attributes HOT 1
- deserialize translated values
- globalize2 and serialize
- rake test failed in rails 3
- Problem with factory girl in integration tests (Rails 2.3.8) HOT 1
- Uppercase locale string
- Default locale and fallbacks
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 globalize2.