主权项 |
1. A non-transitory computer-readable medium storing instructions that, when executed by the one or more processors, cause the one or more processors to implement a data localization service for a web browser residing on a computing device, the data localization service comprising:
an interpreter in the web browser that executes scripts expressed in a scripting language; a priority handler configured to receive a request to localize data from a requesting client application and provide in response thereto a localized representation of the data to the requesting client application, wherein the priority handler is a script expressed in the scripting language and executed by the interpreter; and a native data localizer configured to receive a request to localize data from the priority handler and localize the data in accordance with a localization preference parameter indicative of a locale, wherein the native data localizer is a function integrated into the interpreter, wherein the priority handler calls an external localization function to service the request when the native data localizer fails, wherein the external localization function is implemented by a computer program independent from the web browser but residing on the computing device, and wherein the priority handler calls a remote localization function to service the request when the both the native data localizer and the external localization function fails, wherein the remote localization function resides on a server that is accessed over a data network by the priority handler. |