Comments (6)
Hi asecondwill. I don't currently have any plans to add further translation features. Hopefully the majority of the text used in the gem comes from the locale yml files, so that should be a good start. I think the next step would be to add support for translations on the models if the spree_i18n gem is loaded. Presumably that would be the BlogEntry
model fields for title
, body
and summary
. Is that what you had in mind?
from spree-blogging-spree.
Hi, Yep thats exactly it.
from spree-blogging-spree.
+1 This would be very interesting for me, too!
from spree-blogging-spree.
+1
from spree-blogging-spree.
Hi there! First off: thanks for this plugin here! I also wanted to add translations and tried it myself.
First I created a file named blog_entry_decorator.rb in models/spree containing this code:
Spree::BlogEntry.class_eval do
translates :title, :body, :summary
end
Then I added this migration here
class AddTranslationsToBlogEntries < ActiveRecord::Migration
def up
Spree::BlogEntry.create_translation_table!({
:title => :string, :body => :text, :summary => :text
}, {
:migrate_data => true
})
end
end
is that correct? how can I add the translation fields to the admin view?
Best regards
from spree-blogging-spree.
@mmintel you need to override the view part of this gem as well and use the same procedure to add translations as you can do with a normal rails application. and as suggested by the
globalize gem
you can take help with this gem Spree Globalize
from spree-blogging-spree.
Related Issues (5)
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 spree-blogging-spree.