Creating a Rails "localisation" that is not region or language specific?

Matthew Higgins

I'm quite familiar with how Rails handles internationalisation with regards multiple languages and formatting of dates, currencies and alike.

Extending this idea, is there way to do this with custom sets of vocabulary that are not different languages or regional settings.

For example, in an app which is used by orgnisations, you might have tools to allow "employees" to communicate with their "managers". Is there a way to substitute the vocabulary for, say, "students" and "teachers", on, an organisation-by-organisation basis, while leaving the model, controller and view code all intact?

Jon

You can just use standard i18n localisation.

The Rails guide even gives examples for adding the Pirate language: http://guides.rubyonrails.org/i18n.html#adding-translations

Create your per-organisation languages and set the locale appropriately.

Assuming you need your i18n translations to be a little more dynamic, you may wish to take a look at one of the DB backend gems for i18n. Such as this one: https://github.com/svenfuchs/i18n-active_record

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

search in specific region in matlab

분류에서Dev

Applying an algorithm to a specific region of an image

분류에서Dev

language for creating contract template

분류에서Dev

Change color of a specific region in eye image [Matlab]

분류에서Dev

Restrict android application to specific region through code

분류에서Dev

Finding Speech (voice command) Language+Region/Culture setting?

분류에서Dev

Change Default Font for a Specific Language

분류에서Dev

Language-Specific Architectures/Processors

분류에서Dev

Error while creating rails Database

분류에서Dev

Creating a object with nested form rails

분류에서Dev

ibus 설치 후 Opensuse 13.1 Gnome Desktop Region & Language가 열리지 않음

분류에서Dev

How to set gedit language to specific files

분류에서Dev

Do exists a specific html language to be used on email?

분류에서Dev

Rails updating object creating two database transactions

분류에서Dev

Nil errors in creating a hash in Ruby on Rails

분류에서Dev

rails find records containing specific word

분류에서Dev

Creating a jQuery Validate method that cheks for phone number OR specific text

분류에서Dev

What specific vulnerabilities am I creating by disabling the sudo password?

분류에서Dev

How to restrict Apache Nutch to crawl language specific Documents only

분류에서Dev

Rails 4 - error creating associations through Fabricator in Rspec tests

분류에서Dev

Creating a form in Rails: What method needs to be passed to the various inputs?

분류에서Dev

Rails에서 Content-Language 헤더 정의

분류에서Dev

Rails에서 Content-Language 헤더 정의

분류에서Dev

Creating command-line parameters shortcut depending of language selected in Inno Setup

분류에서Dev

Rails - how to start up a local server (thin) with a specific git branch

분류에서Dev

Using wget, how to download to a specific location, without creating folders, and always overwrite original files

분류에서Dev

Geo region codes list

분류에서Dev

Rails : before_creating one model, go create a second model first

분류에서Dev

WPF Clear Region on a Drawing Context?

Related 관련 기사

  1. 1

    search in specific region in matlab

  2. 2

    Applying an algorithm to a specific region of an image

  3. 3

    language for creating contract template

  4. 4

    Change color of a specific region in eye image [Matlab]

  5. 5

    Restrict android application to specific region through code

  6. 6

    Finding Speech (voice command) Language+Region/Culture setting?

  7. 7

    Change Default Font for a Specific Language

  8. 8

    Language-Specific Architectures/Processors

  9. 9

    Error while creating rails Database

  10. 10

    Creating a object with nested form rails

  11. 11

    ibus 설치 후 Opensuse 13.1 Gnome Desktop Region & Language가 열리지 않음

  12. 12

    How to set gedit language to specific files

  13. 13

    Do exists a specific html language to be used on email?

  14. 14

    Rails updating object creating two database transactions

  15. 15

    Nil errors in creating a hash in Ruby on Rails

  16. 16

    rails find records containing specific word

  17. 17

    Creating a jQuery Validate method that cheks for phone number OR specific text

  18. 18

    What specific vulnerabilities am I creating by disabling the sudo password?

  19. 19

    How to restrict Apache Nutch to crawl language specific Documents only

  20. 20

    Rails 4 - error creating associations through Fabricator in Rspec tests

  21. 21

    Creating a form in Rails: What method needs to be passed to the various inputs?

  22. 22

    Rails에서 Content-Language 헤더 정의

  23. 23

    Rails에서 Content-Language 헤더 정의

  24. 24

    Creating command-line parameters shortcut depending of language selected in Inno Setup

  25. 25

    Rails - how to start up a local server (thin) with a specific git branch

  26. 26

    Using wget, how to download to a specific location, without creating folders, and always overwrite original files

  27. 27

    Geo region codes list

  28. 28

    Rails : before_creating one model, go create a second model first

  29. 29

    WPF Clear Region on a Drawing Context?

뜨겁다태그

보관