Coder Social home page Coder Social logo

wlalang003 / spree_globalize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spree-contrib/spree_globalize

0.0 1.0 0.0 6.08 MB

Adds support for model translations (multi-language stores) using Globalize gem

Home Page: https://spreecommerce.org

License: BSD 3-Clause "New" or "Revised" License

Ruby 81.42% JavaScript 3.30% HTML 15.28%

spree_globalize's Introduction

Spree Globalize

Build Status Code Climate

This is the globalization project extracted from spree_i18n for Spree Commerce version 3.1+.

For previous Spree versions you can just use spree_i18n.

See the official Internationalization documentation for more details.

Happy translating!


Installation

Add the following to your Gemfile:

gem 'spree_i18n', '~> 5.0'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'

Run bundle install

You can use the generator to install migrations and append spree_globalize assets to your app spree manifest file.

rails g spree_globalize:install

This will insert these lines into your spree manifest files:

vendor/assets/javascripts/spree/backend/all.js
//= require spree/backend/spree_globalize

Model Translations

This feature uses the Globalize gem to localize model data. So far the following models are translatable:

Product, Promotion, OptionType, Taxonomy, Taxon, Property, Store and ShippingMethod.

Start your server and you should see a TRANSLATIONS link or a flag icon on each admin section that supports this feature.

Every record needs to have a translation. If by any chance you remove spree_globalize from your Gemfile, add some records and then add spree_globalize gem back you might get errors like undefined method for nilClass because Globalize will try fetch translations that do not exist.


Contributing

See corresponding guidelines


Copyright (c) 2010-2021 Spree Commerce Inc. and other contributors. released under the New BSD License

spree_globalize's People

Contributors

adhlssu07 avatar alepore avatar camelmasa avatar cbilgili avatar daan- avatar damianlegawiec avatar futhr avatar geekoncoffee avatar greendog avatar gugod avatar hnatt avatar huoxito avatar igmarin avatar j15e avatar jdutil avatar jpavello avatar kagetsuki avatar maxim-filimonov avatar peterberkenbosch avatar pszyszkaspark avatar pusewicz avatar radar avatar reinaris avatar romul avatar sadfuzzy avatar schof avatar tka avatar tobiashm avatar tvdeyen avatar vyper avatar

Watchers

 avatar

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.