π i18nConfig
- Human readable text
- Dosage
- i18nConfig
{
"timing": {
"repeat": {
"boundsDuration": {
"system": "http://hl7.org/fhir/ValueSet/duration-units",
"value": 3,
"code": "d"
}
}
}
}
import LocalStorageBackend from 'i18next-localstorage-backend'; // load from local storage
import HttpApi from 'i18next-http-backend'; // have a own http fallback
{
backend: {
backends: [
LocalStorageBackend, // primary
HttpApi // fallback
],
backendOptions: [{
projectId: 'myLocizeProjectId'
}, {
// http api load path for my own fallback
// Check https://github.com/jy95/fhir-dosage-utils/tree/main/src/locales/en for more info
loadPath: '/locales/{{lng}}/{{ns}}.json'
}],
// cacheHitMode: 'none' // (default)
// cacheHitMode: 'refresh' // tries to refresh the cache by loading from the next backend and updates the cache
// cacheHitMode: 'refreshAndUpdateStore' // tries to refresh the cache by loading from the next backend, updates the cache and also update the i18next resource store
// reloadInterval: 60 * 60 * 1000 // can be used to reload resources in a specific interval (useful in server environments)
// refreshExpirationTime: 7 * 24 * 60 * 60 * 1000 // In case of caching with 'refresh' or 'refreshAndUpdateStore', it will only fetch from the next backend if the cached namespace is expired. Only supported if the backend returns the saved timestamp, like i18next-fs-backend, i18next-localstorage-backend
}
}