-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from aviscasillas/detect-client-language
Detect client language
- Loading branch information
Showing
7 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ def index | |
end | ||
|
||
def rnd | ||
@msg = Excuse.find_rnd.msg['es'] | ||
@msg = Excuse.find_rnd.msg[I18n.locale.to_s] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ca: | ||
hello: "Hola Mon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
es: | ||
hello: "Hola Mundo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
Excuse.all.each do |e| | ||
e.remove | ||
end | ||
Excuse.create(msg: { es: 'Hoy hace mucha humedad' } ) | ||
Excuse.create(msg: { es: 'Esta roca se desace mucho' } ) | ||
Excuse.create(msg: { es: 'Si fuera un poco mas alto...' } ) | ||
Excuse.create(msg: { | ||
en: 'Today is too wet', | ||
es: 'Hoy hace mucha humedad' | ||
}) | ||
Excuse.create(msg: { | ||
en: 'This rock is too soft', | ||
es: 'Esta roca se desace mucho' | ||
}) | ||
Excuse.create(msg: { | ||
en: 'If I would be higher...', | ||
es: 'Si fuera un poco mas alto...' | ||
}) |