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?
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] 삭제
몇 마디 만하겠습니다