Recursively walks value and replaces strings matching %key% with the result of resolve(key). If resolve(key) returns undefined or an empty string, the original %key% is kept (same as the former worker localize: translations[key] || value).
value
%key%
resolve(key)
undefined
localize
translations[key] || value
Recursively walks
valueand replaces strings matching%key%with the result ofresolve(key). Ifresolve(key)returnsundefinedor an empty string, the original%key%is kept (same as the former workerlocalize:translations[key] || value).