Git Product home page Git Product logo

devise-i18n's Introduction

devise-i18n

Build Status

Devise "is a flexible authentication solution for Rails based on Warden". Internationalization (aka i18n) is a "means of adapting computer software to different languages, regional differences and technical requirements of a target market".

Devise supports i18n in controllers, models, and in other areas, but it does not have support for internationalized views. devise-i18n adds this support. Devise also does not include the actual translations. devise-i18n does this too.

devise-18n is for devise v2 and later. For devise v1.5, use the devise-1.5 branch.

Installation

Add to your Gemfile:

gem 'devise-i18n'

Assuming you have not previously generated Devise's views into your project, that's all you need to do. If you have previously done this, you will need to regenerate your views (see the next section) and then reapply whatever customizations that made you do this in the first place.

NOTE: If you have the simple_form gem in your Gemfile, this command will generate the corresponding views using the simple_form form builder.

Customizing views

The devise:i18n:views generator will copy all devise-i18n's views to your application so that you can modify the files as you wish.

rails g devise:i18n:views

You should only do this if you really need to, though, because doing this will make it so that you won't get the updated views should they change in a future version of devise-i18n. To "uncustomize" the views, just delete them, and your app will go back to grabbing devise-i18n's default views.

Customizing translations

If, for whatever reason, you want to change devise-i18n's translations, you can generate the locale file into your project with

rails g devise:i18n:locale it

which will generate config/locales/devise.views.it.yml. If you're doing this to add a missing translation or to improve an existing one, it'd be nice if you could share your suggestions with us!

Contributing translations to devise-i18n

  • Edit the translations directly on the devise-i18n project on Locale.
  • That's it!
  • The maintainer will then pull translations from the Locale project and push to Github.

Happy translating!

Copyright

Copyright (c) 2011 Christopher Dell. See LICENSE.txt for further details.

devise-i18n's People

Contributors

acrogenesis avatar ahone avatar deeeki avatar douglaslise avatar foton avatar frodrigo avatar gugod avatar hron84 avatar ignisf avatar jasonbarnabe avatar mabras avatar mhbcse avatar mixmix avatar novicaz avatar oriolgual avatar pcriv avatar petk avatar pierot avatar pjomcsjava avatar revi avatar rlopzc avatar ryush00 avatar satour avatar serghost avatar simi avatar simoniong avatar simonkotwicz avatar springstorm5 avatar tigrish avatar timoschilling 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.