Module: I18nRemote
- Defined in:
- lib/i18n_remote/backend/remote_file.rb
Overview
This is a basic backend for supporting remote files. It receives on initialization the server where the remote translations reside, the remote files and the authentication token to access the remote files. It fetaches the translations from the remote files and stores them in an in-memory hash. Inherits from the Simple backend and should be chained to the simple backend store so the local translations are used in case of Network errors.
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::RemoteFile.new(params), I18n.backend) The remote files to be fetched should have the following JSON format “translation_file_1”: {
"en":
{
"name": "Name",
"title": "Title",
"content": "Content"
}
}
Defined Under Namespace
Modules: Backend