++ **SiLo.language.cache( code, loader, relocalize, makeFallback )** - Sets the current dictionary from cache. If there is no `code` entry in the cache, `loader` (a callback you must provide) will be asked to load it; the `loader` must follow the `loader( code, callback )` signature, where `code` is the same language/country code entry missing from cache and `callback( dictionary )` must be called once you successfuly load the dictionary file -- not calling it simply results in the operation being aborted. When the language finishes loading, `relocalize` will be called: this is a callback you provide so that you can relocalize the document once the language switching is done successfully. `makeFallback` works in the same way as in the simpler **load** function.
0 commit comments