https://github.com/tegon/game-translator
Interface para traduzir games para vários idiomas, usando o Globalize3.
https://github.com/tegon/game-translator
Last synced: about 2 months ago
JSON representation
Interface para traduzir games para vários idiomas, usando o Globalize3.
- Host: GitHub
- URL: https://github.com/tegon/game-translator
- Owner: tegon
- Created: 2013-07-15T16:13:05.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-02-21T14:41:10.000Z (over 12 years ago)
- Last Synced: 2025-01-17T23:32:48.188Z (over 1 year ago)
- Language: Ruby
- Homepage: game-translator.herokuapp.com
- Size: 1.75 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GameTranslator
--------------
You can change attributes in specific locales calling the method like this:
```ruby
attribute_locale
```
For example, change name in English(en)
```ruby
Game.first.name
=> "Jogo 1"
Game.first.update_attribute(:name_en, 'Game 1')
=> "Game 1"
```
Now if you change the actual locale
```ruby
I18n.locale = :en
```
It will return the name in English
```ruby
Game.first.name
=> "Game 1"
```
You can also call this way
```ruby
Game.first.name_en
=> "Game 1"
```