localizer_rails 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/localizer_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2ca2510f23f9b1ea64fa26b87875605a0155d61
|
4
|
+
data.tar.gz: feca27625325290298278bc7cb3286d01b4ef303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aed3ba460e57d4f816e78a05da4289915769b7df55ca6cf2f2c61743bb2157d34264e790e6093811a3b2996c6b43a8a3b155b0a35deeabfd966f12d37882ff9
|
7
|
+
data.tar.gz: ef3df54b0ef1a083435be96e10eadfab523dafd0abbfe6f0b8b6a1d8af79bb5dd570cb3d071f863c3234b6c6940f4b44ea87d59c52695a2c8d45734b2c9fdadb
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Rails version: 4+
|
|
12
12
|
|
13
13
|
**Gemfile**:
|
14
14
|
|
15
|
-
gem 'localizer_rails', '0.1.
|
15
|
+
gem 'localizer_rails', '0.1.2'
|
16
16
|
**Style**:
|
17
17
|
|
18
18
|
@import 'localizer_rails/localizer_rails';
|
@@ -36,11 +36,11 @@ finds the best-match for `I18n.locale` through a cascading search:
|
|
36
36
|
|
37
37
|
and sets values accordingly (cookies, link_to, ...)
|
38
38
|
|
39
|
-
|
39
|
+
- use in **_before_action_**:
|
40
40
|
|
41
41
|
<pre>before_action LocalizerRails::SetLoc</pre>
|
42
42
|
|
43
|
-
|
43
|
+
- use in **_routes_**, too:
|
44
44
|
|
45
45
|
<pre>
|
46
46
|
scope ":locale", locale: /#{LocalizerRails.active_locales.join("|")}/ do ...
|
@@ -67,7 +67,7 @@ scope ":locale", locale: /#{LocalizerRails.active_locales.join("|")}/ do ...
|
|
67
67
|
|
68
68
|
builds an hash of locale key/value pairs useful to build a `locale_menu`
|
69
69
|
|
70
|
-
_[optional]_ override and edit `config/
|
70
|
+
_[optional]_ override and edit `config/localizer_rails/lang_countries.yml`
|
71
71
|
|
72
72
|
<pre>
|
73
73
|
:da:
|
@@ -98,14 +98,14 @@ xtra country specs, use if `locale_menu` lists countries instead of languages:
|
|
98
98
|
**_NOTE_**: languages will be listed ONLY if included in `i18n.available_locales`
|
99
99
|
|
100
100
|
_[optional]_ edit **_LI structure_** and attributes in
|
101
|
-
<pre>app/views/
|
101
|
+
<pre>app/views/localizer_rails/_item[.bootstrap].html.erb</pre>
|
102
102
|
|
103
103
|
_[optional]_ edit **_LI elements_** and their display order in
|
104
|
-
<pre>app/views/
|
104
|
+
<pre>app/views/localizer_rails/_elements.html.erb</pre>
|
105
105
|
|
106
106
|
__CONFIGURATION__
|
107
107
|
|
108
|
-
_[optional]_ override and edit `config/initializers/
|
108
|
+
_[optional]_ override and edit `config/initializers/localizer_rails/localizer_rails_prefs.rb`
|
109
109
|
|
110
110
|
<pre>
|
111
111
|
LocalizerRails::Conf.configure do |conf|
|