github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

myabc / merb_global

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 33
    • 5
  • Source
  • Commits
  • Network (5)
  • Downloads (12)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (3)
    • 0.0.4-branch
    • html
    • master ✓
  • Tags (12)
    • v0.0.7
    • v0.0.6
    • v0.0.5.2
    • v0.0.5.1
    • v0.0.5
    • v0.0.4.2
    • v0.0.4.1
    • v0.0.4
    • v0.0.3.1
    • v0.0.3
    • v0.0.2
    • v0.0.1
Sending Request…
Click here to lend your support to: merb_global and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Localization (L10n) and Internationalization (i18n) support for the Merb MVC Framework — Read more

  cancel

http://merbglobal.piechotka.com.pl/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fix for Ruby 1.8.6 compatibility 
fbettag (author)
Tue Sep 01 05:33:09 -0700 2009
myabc (committer)
Tue Sep 01 05:33:09 -0700 2009
commit  6e58d387d700322de45dd5fff3f63cd446793c53
tree    33fc4fe028e981f9384dcbbdfc0fa75f4d9dc62a
parent  1ffc3f880a9c3a3edd3d3a57a97f23a1425b4771
merb_global /
name age
history
message
file .gitignore Thu Jan 29 05:56:53 -0800 2009 Fixes for upstream dm-core/merb-core [uzytkownik]
file CONTRIBUTORS Tue Jun 24 08:17:44 -0700 2008 Updated CONTRIBUTORS [myabc]
file HISTORY Sat Feb 14 19:21:37 -0800 2009 Version 0.0.7 [uzytkownik]
file LICENSE Tue May 27 00:46:08 -0700 2008 Updating License Copyright [myabc]
file README Mon May 12 16:50:54 -0700 2008 Updated spec_helper.rb so that merb_global is l... [myabc]
file README.markdown Sun Aug 10 14:06:33 -0700 2008 Updated documentation [uzytkownik]
file Rakefile Sat Feb 14 19:21:37 -0800 2009 Version 0.0.7 [uzytkownik]
file TODO Sun Nov 23 06:47:03 -0800 2008 Add issue tracking URL to TODO [myabc]
directory activerecord_generators/ Fri Jul 04 16:55:11 -0700 2008 Renamed MessageProviders and fix of comas [uzytkownik]
directory benchmarks/ Tue Jun 24 08:18:25 -0700 2008 Cleaning up whitepace using sake 'strip' [myabc]
directory examples/ Sun Dec 07 17:19:01 -0800 2008 Updated examples [uzytkownik]
directory lib/ Tue Sep 01 05:33:09 -0700 2009 Fix for Ruby 1.8.6 compatibility Signed-off-by... [fbettag]
file merb_global.gemspec Wed May 06 10:56:12 -0700 2009 added gemspec for git [lastobelus]
directory sequel_generators/ Fri Oct 31 15:54:50 -0700 2008 Cleaned sequel generator [uzytkownik]
directory spec/ Thu Jan 29 06:11:07 -0800 2009 Corrected the bugs from 4ce4cbb63e3e2be9d61b323... [giom]
README.markdown

MerbGlobal README

A plugin for the Merb framework providing Localization (L10n) and Internationalization (i18n) support.

merb_global will have the following feature set:

  • support for model (content) localization

    • by default, localization stored in the database
      • with DataMapper (targeted 0.1)
      • with ActiveRecord (targeted 0.2)
      • with Sequel ORM
    • and, with a choice of strategies in each case:
      • single-table (c.f. globalize RoR plugin)

        |title   |varchar(100)|
        |title_de|varchar(100)|
        |title_fr|varchar(100)|
        
      • joined-table for unlimited localizations (c.f. Symfony PHP)

    • or, alternatively localizations can be stored outside of the domain model, UI Strings.
  • support for view (UI String) localization

    • choice of providers (po, yaml, database)

      Merb::Plugins.config[:merb_global] = {
        #:message_provider => "po",   # default
        :message_provider => 'yaml'
        #:message_provider => active_record
        #:message_provider => data_mapper
        #:message_provider => sequel
      }
      
    • for JRuby, wrapper allowing use of .properties files.

  • Extract, update for PO/POT files

  • Currency, Date and Language Helpers

     - stored either in the database, or for JRuby, wrappers around
     built-in functionality provided by java.util.Currency, java.util.Locale
    
  • support for localization of Merb generated code

  • support for non-English Inflectors.

Developer ReadMe

REQUEST : Your development support is very much appreciated. Please contact us below if you're interested in lending a hand with the development of this project.

Getting the Source

Performing a git clone on either of the following repositories will get you the latest source:

git clone git://github.com/myabc/merb_global.git
git clone git://gitorious.org/merb_global/mainline.git (on gitorious)

The following additional mirrors are available:

git://repo.or.cz/merb_global.git
http://repo.or.cz/r/merb_global.git

Installation and Setup

Dependencies:
sudo gem install gettext

Installing MerbGlobal
rake gem
sudo gem install pkg/merb_global-0.0.1.gem

Configuration options

MerbGlobal is possible to configure with:

Merb::Plugins.config[:merb_global] = {
    :message_provider => 'gettext'
    ...
 }

in init.rb or using plugins.yml file:

:merb_global:
    :message_provider: gettext
    ...

Configuration options:

  • :message_provider

What message provider we want to use.

Values: gettext, yaml, sequel, active_record, data_mapper Default: gettext

  • :date_provider

What date provider we want to use.

Values: fork Default: fork

  • :numeric_providers

What numeric provider we want to use.

Values: fork Default: fork

  • :flat

Are we running merb-flat or normal merb?

Values: true/false Default: false

  • :localedir

Define directory where translations are stored.

If :flat is set to true than MerbGlobal will search in #{Merb.root}+'locale'. If :flat is false than in #{Merb.root}+:localedir. When :flat is false and :localedir configuration is not defined the default will be #{Merb.root}+'app/locale'.

  • :gettext => :domain

Name of the text domain. Which is basically name of the GetText MO file without .mo extension.

Default: merbapp

Configuration examples

Follwing configuraiton in plugins.yml:

:merb_global:
    :provider:  gettext
    :flat:      false
    :localedir: locale
:gettext:
    :domain:    messages

will make MerbGlobal to search translations in following places:

#{Merb.root}/locale/#{language}/LC_MESSAGES/messages.mo
#{Merb.root}/locale/#{language}/messages.mo

Where #{language} is string which defines language such as cs_CZ, en_GB or just cs, en.

No configuration will look at:

#{Merb.root}/app/locale/#{language}/LC_MESSAGES/merbapp.mo
#{Merb.root}/app/locale/#{language}/merbapp.mo

Licensing and Copyright

MerbGlobal is released under an MIT License. Copyright information, as well as a copy of the License may be found in the LICENSE file.

Support

WARNING REPEATED : MerbGlobal at an early stage of its development. You should not use this code unless you're reasonably secure with both Ruby and Merb. That said, please do get involved!

Your best sources for support are currently the wiki, IRC or our mailing list:

  • MerbGlobal Wiki: http://trac.ikonoklastik.com/merb_global/
  • MerbGlobal mailing list: http://groups.google.com/group/merb_global
  • MerbGlobal homepage: coming soon
  • Contact the developers directly:
    • alex@alexcolesportfolio.com | myabc on #datamapper, #merb IRC
    • uzytkownik2@gmail.com | xmpp:uzytkownik@jid.pl
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server