Code Monkey home page Code Monkey logo

polish's Introduction

Polish

travis-ci stillmaintained

Polish language support for Ruby on Rails.

Adds correct polish pluralization and better date formats. Also includes support for standalone months. ("%B %Y" should be Grudzień 2009, but "%d. %B %Y" should be 24. grudnia 2009).

Based on Russian by yaroslav.

Install

Warning: as of version 0.1.0, polish is only tested with Rails 3 and Bundler. Use with caution, might give unexpected results.

To add Polish to your Rails app, simply add it to your Gemfile:

gem "polish", ">= 0.1.0"

Additionally, if you change the backend of I18n, you will need to make sure it includes the Pluralization module:

I18n.backend.class.send(:include, I18n::Backend::Pluralization)

What it does

The main feature of polish is fixing the date formats. It does that by setting the date.month_names and date.day_names translations to Procs that can detect the proper form.

Polish also adds correct pluralization rules.

Overrides

Translations and date formats can be overridden in config/locales/pl.yml

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.