Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 180 lines (121 sloc) 5.09 kb
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
1 MerbGlobal README
2 =================
c3546c1 @myabc Moved README to README.markdown
authored
3
4 A plugin for the Merb framework providing Localization (L10n) and
5 Internationalization (i18n) support.
6
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
7 merb\_global will have the following feature set:
8
9 * support for model (content) localization
10 - by default, localization stored in the database
11 - with DataMapper (targeted 0.1)
12 - with ActiveRecord (targeted 0.2)
13 - with Sequel ORM
14 - and, with a choice of strategies in each case:
15 - single-table (c.f. globalize RoR plugin)
16
c3546c1 @myabc Moved README to README.markdown
authored
17 |title |varchar(100)|
18 |title_de|varchar(100)|
19 |title_fr|varchar(100)|
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
20
21 - joined-table for unlimited localizations (c.f. Symfony PHP)
22 - or, alternatively localizations can be stored outside of the domain
23 model, UI Strings.
24
25 * support for view (UI String) localization
26 - choice of providers (po, yaml, database)
c3546c1 @myabc Moved README to README.markdown
authored
27
28 Merb::Plugins.config[:merb_global] = {
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
29 #:message_provider => "po", # default
30 :message_provider => 'yaml'
31 #:message_provider => active_record
32 #:message_provider => data_mapper
33 #:message_provider => sequel
c3546c1 @myabc Moved README to README.markdown
authored
34 }
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
35
36 - for JRuby, wrapper allowing use of .properties files.
c3546c1 @myabc Moved README to README.markdown
authored
37
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
38 * Extract, update for PO/POT files
39 * Currency, Date and Language Helpers
c3546c1 @myabc Moved README to README.markdown
authored
40 - stored either in the database, or for JRuby, wrappers around
41 built-in functionality provided by java.util.Currency, java.util.Locale
42
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
43 * support for localization of Merb generated code
bb2be86 @myabc Updated README.markdown.
authored
44 * support for non-English Inflectors.
c3546c1 @myabc Moved README to README.markdown
authored
45
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
46 Developer ReadMe
47 ----------------
48
49 **REQUEST** : Your development support is very much appreciated. Please
c3546c1 @myabc Moved README to README.markdown
authored
50 contact us below if you're interested in lending a hand with the development
51 of this project.
52
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
53 Getting the Source
54 ------------------
c3546c1 @myabc Moved README to README.markdown
authored
55
f716e06 @myabc Added gitorious-hosted repo to repository list.
authored
56 Performing a git clone on either of the following repositories will get you
57 the latest source:
58
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
59 git clone git://github.com/myabc/merb_global.git
f716e06 @myabc Added gitorious-hosted repo to repository list.
authored
60 git clone git://gitorious.org/merb_global/mainline.git (on gitorious)
c3546c1 @myabc Moved README to README.markdown
authored
61
f716e06 @myabc Added gitorious-hosted repo to repository list.
authored
62 The following additional mirrors are available:
c3546c1 @myabc Moved README to README.markdown
authored
63
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
64 git://repo.or.cz/merb_global.git
65 http://repo.or.cz/r/merb_global.git
c3546c1 @myabc Moved README to README.markdown
authored
66
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
67 Installation and Setup
68 ----------------------
c3546c1 @myabc Moved README to README.markdown
authored
69
41fec1e @pk Gettext dependencies mentioned in installation part.
pk authored
70 Dependencies:
71 sudo gem install gettext
72
73 Installing MerbGlobal
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
74 rake gem
75 sudo gem install pkg/merb_global-0.0.1.gem
c3546c1 @myabc Moved README to README.markdown
authored
76
9b461b1 Added section about config. options
Pavel Kunc authored
77 Configuration options
78 ---------------------
79
80 MerbGlobal is possible to configure with:
81
82 Merb::Plugins.config[:merb_global] = {
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
83 :message_provider => 'gettext'
9b461b1 Added section about config. options
Pavel Kunc authored
84 ...
85 }
86
87 in init.rb or using plugins.yml file:
88
89 :merb_global:
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
90 :message_provider: gettext
9b461b1 Added section about config. options
Pavel Kunc authored
91 ...
92
93 Configuration options:
94
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
95 * :message_provider
9b461b1 Added section about config. options
Pavel Kunc authored
96
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
97 What message provider we want to use.
9b461b1 Added section about config. options
Pavel Kunc authored
98
d645394 Markdown fixies.
Pavel Kunc authored
99 Values: gettext, yaml, sequel, active\_record, data\_mapper
9b461b1 Added section about config. options
Pavel Kunc authored
100 Default: gettext
101
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
102 * :date_provider
103
104 What date provider we want to use.
105
106 Values: fork
107 Default: fork
108
109 * :numeric_providers
110
111 What numeric provider we want to use.
112
113 Values: fork
114 Default: fork
115
9b461b1 Added section about config. options
Pavel Kunc authored
116 * :flat
117
118 Are we running merb-flat or normal merb?
119
120 Values: true/false
121 Default: false
122
123 * :localedir
124
125 Define directory where translations are stored.
126
127 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'.
128
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
129 * :gettext => :domain
9b461b1 Added section about config. options
Pavel Kunc authored
130
131 Name of the text domain. Which is basically name of the GetText MO file without .mo extension.
132
133 Default: merbapp
134
d645394 Markdown fixies.
Pavel Kunc authored
135 ##Configuration examples
9b461b1 Added section about config. options
Pavel Kunc authored
136
137 Follwing configuraiton in plugins.yml:
138
139 :merb_global:
140 :provider: gettext
141 :flat: false
142 :localedir: locale
98af9d6 @uzytkownik Updated documentation
uzytkownik authored
143 :gettext:
144 :domain: messages
9b461b1 Added section about config. options
Pavel Kunc authored
145
146 will make MerbGlobal to search translations in following places:
147
148 #{Merb.root}/locale/#{language}/LC_MESSAGES/messages.mo
149 #{Merb.root}/locale/#{language}/messages.mo
150
d645394 Markdown fixies.
Pavel Kunc authored
151 Where #{language} is string which defines language such as cs\_CZ, en\_GB or just cs, en.
9b461b1 Added section about config. options
Pavel Kunc authored
152
153 No configuration will look at:
154
155 #{Merb.root}/app/locale/#{language}/LC_MESSAGES/merbapp.mo
156 #{Merb.root}/app/locale/#{language}/merbapp.mo
157
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
158 Licensing and Copyright
159 -----------------------
c3546c1 @myabc Moved README to README.markdown
authored
160
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
161 MerbGlobal is released under an **MIT License**. Copyright information, as
162 well as a copy of the License may be found in the LICENSE file.
163
164 Support
165 -------
c3546c1 @myabc Moved README to README.markdown
authored
166
bb2be86 @myabc Updated README.markdown.
authored
167 **WARNING REPEATED** : MerbGlobal at an early stage of its development.
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
168 You should not use this code unless you're reasonably secure with both Ruby
169 and Merb. That said, _please do get involved!_
c3546c1 @myabc Moved README to README.markdown
authored
170
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
171 Your best sources for support are currently the wiki, IRC or our mailing
172 list:
c3546c1 @myabc Moved README to README.markdown
authored
173
bb2be86 @myabc Updated README.markdown.
authored
174 * **MerbGlobal Wiki**: <http://trac.ikonoklastik.com/merb_global/>
f716e06 @myabc Added gitorious-hosted repo to repository list.
authored
175 * **MerbGlobal mailing list**: <http://groups.google.com/group/merb_global>
1aabaec @myabc Converted README.markdown to Markdown formatting.
authored
176 * **MerbGlobal homepage**: _coming soon_
177 * Contact the developers directly:
178 - <alex@alexcolesportfolio.com> | myabc on #datamapper, #merb IRC
a8a0a56 @uzytkownik Updated authors
uzytkownik authored
179 - <uzytkownik2@gmail.com> | <xmpp:uzytkownik@jid.pl>
Something went wrong with that request. Please try again.