Server-side internationalization framework for web applications
First Claim
1. A computer-implemented method comprising:
- receiving, at a server, a web-protocol request from a client device, wherein the web-protocol request is a Representation State Transfer (REST) request;
triggering a server-side operation in response to the request;
identifying, based on a result of the operation, first text information to be returned to the client device, wherein a text key corresponds to the first text information, and in code used by the server, the first text information is replaced with the text key;
determining a language associated with the client device based on at least one of;
a language specified in the web-protocol request, anda supported language that is an approximation of the language specified in the web-protocol request, wherein the approximation is determined based on a set of rules;
determining whether a resource file corresponding to the determined language is loaded in a volatile memory on the server, wherein the resource file stores a mapping between the text key, first text information and second text information;
loading a resource file corresponding to the determined language, from a non-volatile memory into the volatile memory, in a case where the resource file corresponding to the determined language is not loaded in the volatile memory;
retrieving, from the resource file in the volatile memory, and based on the text key, second text information which corresponds to the first text information to be returned to the client device; and
transmitting the second text information to the client device,wherein the first text information includes parametrized text, and further comprising, prior to transmitting the second text information to the client device,retrieving, from the non-volatile memory, a parameter value corresponding to the first text information to be returned to the client device; and
interpolating the parameterized text with the parameter value.
1 Assignment
0 Petitions
Accused Products
Abstract
A server receives a web-protocol request from a client that triggers a server-side operation in response to the request. Based on a result of the operation, the server identifies first text information to be returned to the client. A language associated with the client device is determined. A determination is made as to whether a resource file corresponding to the determined language is loaded in a volatile memory on the server. In a case where a resource file corresponding to the determined language is not loaded in the volatile memory, the resource file corresponding to the determined language is loaded from a non-volatile memory into the volatile memory on the server. Second text information which corresponds to the first text information to be returned to the client device is retrieved from the resource file in the volatile memory. The second text information is transmitted to the client.
58 Citations
17 Claims
-
1. A computer-implemented method comprising:
-
receiving, at a server, a web-protocol request from a client device, wherein the web-protocol request is a Representation State Transfer (REST) request; triggering a server-side operation in response to the request; identifying, based on a result of the operation, first text information to be returned to the client device, wherein a text key corresponds to the first text information, and in code used by the server, the first text information is replaced with the text key; determining a language associated with the client device based on at least one of; a language specified in the web-protocol request, and a supported language that is an approximation of the language specified in the web-protocol request, wherein the approximation is determined based on a set of rules; determining whether a resource file corresponding to the determined language is loaded in a volatile memory on the server, wherein the resource file stores a mapping between the text key, first text information and second text information; loading a resource file corresponding to the determined language, from a non-volatile memory into the volatile memory, in a case where the resource file corresponding to the determined language is not loaded in the volatile memory; retrieving, from the resource file in the volatile memory, and based on the text key, second text information which corresponds to the first text information to be returned to the client device; and transmitting the second text information to the client device, wherein the first text information includes parametrized text, and further comprising, prior to transmitting the second text information to the client device, retrieving, from the non-volatile memory, a parameter value corresponding to the first text information to be returned to the client device; and interpolating the parameterized text with the parameter value. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for facilitating server-side internationalization of a web application, the system comprising:
-
a server having a processor and a volatile memory; a client device having a browser for accessing the server over a network; an application framework executable in the server, coupled to at least one application by an application programming interface and arranged to access the volatile memory, wherein, when executed, the application framework performs the operations of; receiving, at a server, a web-protocol request from a client device, wherein the web-protocol request is a Representation State Transfer (REST) request; triggering a server-side operation in response to the request; identifying, based on a result of the operation, first text information to be returned to the client device, wherein a text key corresponds to the first text information, and in code used by the server, the first text information is replaced with the text key; determining a language associated with the client device based on at least one of; a language specified in the web-protocol request, and a supported language that is an approximation of the language specified in the web-protocol request, wherein the approximation is determined based on a set of rules; determining whether a resource file corresponding to the determined language is loaded in a volatile memory on the server, wherein the resource file stores a mapping between the text key, first text information and second text information; loading a resource file corresponding to the determined language, from a non-volatile memory into the volatile memory, in a case where the resource file corresponding to the determined language is not loaded in the volatile memory; retrieving, from the resource file in the volatile memory, and based on the text key, second text information which corresponds to the first text information to be returned to the client device; and transmitting the second text information to the client device, wherein the first text information includes parametrized text, and further comprising, prior to transmitting the second text information to the client device, retrieving, from the non-volatile memory, a parameter value corresponding to the first text information to be returned to the client device; and interpolating the parameterized text with the parameter value. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A non-transitory computer readable medium having stored therein instructions that when executed cause a computer to perform a method comprising:
-
receiving, at a server, a web-protocol request from a client device, wherein the server includes a plurality of server nodes, each having access to a volatile memory, and the web-protocol request is a Representation State Transfer (REST) request; triggering a server-side operation in response to the request; performing, via the server, the server-side operation to generate a result to the web-protocol request; identifying, based on a result of the operation, first text information to be returned to the client device, wherein a text key corresponds to the first text information and in code used by the server, the first text information is replaced with the text key; determining a language associated with the client device based on at least one of; a language specified in the web-protocol request, and a supported language that is an approximation of the language specified in the web-protocol request, wherein the approximation is determined based on a set of rules; determining whether a resource file corresponding to the determined language is loaded in a volatile memory on the server, wherein the volatile memory is a shared memory, and the resource file stores a mapping between the text key, first text information and second text information; loading a resource file corresponding to the determined language, from a non-volatile memory into the volatile memory, in a case where the resource file corresponding to the determined language is not loaded in the volatile memory; retrieving, from the resource file in the volatile memory, and based on the text key, second text information which corresponds to the first text information to be returned to the client device; and transmitting the second text information to the client device, wherein the first text information includes parameterized text, and further comprising, prior to transmitting the second text information to the client device, retrieving, from the non-volatile memory, a parameter value corresponding to the first text information to be returned to the client device; and interpolating the parameterized text with the parameter value. - View Dependent Claims (16, 17)
-
Specification