Patent Publication Number: US-2012030562-A1

Title: Device and method for generating customized webpages

Description:
BACKGROUND 
     1. Technical Field 
     Embodiments of the present disclosure relate generally to webpage designs, and more particularly to a device and method for generating a customized webpage. 
     2. Description of Related Art 
     Dynamic webpages are popular among designers due to ease of design and publication for large and feature-rich websites. Such webpages address the problem of growing and increasingly complex websites, while providing richer features and more detailed and varied content. However, creation, tracking, and maintenance of each distinct customized webpage and interaction with a browser supporting an end-user are limited by language difference. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a schematic diagram of one embodiment of a computing device for generating a customized webpage. 
         FIG. 2  is a schematic diagram illustrating one example of creating a root folder using the computing device of  FIG. 1 . 
         FIG. 3  is a flowchart of one embodiment of a method for generating a customized webpage using a computing device such as, for example, that of  FIG. 1 . 
     
    
    
     DETAILED DESCRIPTION 
     The disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one. 
     As used herein, the term “customized webpage” refers to a webpage customized by an end-user according to end-user requirements. The customized webpage may provide richer features and more detailed and varied content than a common webpage, and can be displayed on a browser of a terminal device in different languages. The content are included in the customized webpage and can be accessed by the end-user, and may include information, image files, audio and video files, for example. 
       FIG. 1  is a schematic diagram of one embodiment of a computing device  1  for generating a customized webpage. In the embodiment, the computing device  1  can generate a customized webpage that adapts to different user requirements, and displays the customized webpage on a display of a terminal device  2 . The computing device  1  may be a gateway, an ADSL modem, a cable modem, or any suitable communication connection device. In one embodiment, the computing device  1  includes a webpage generation unit  10 , a storage system  11 , and at least one processor  12 . It should be understood that  FIG. 1  illustrates only one example of the computing device  1 , and may include more or fewer components than illustrated, or a different configuration of the various components in other embodiments. 
     The terminal device  2  connects to the customized webpage generation device  1  through a network  3 , such as the Internet, an intranet, or any other suitable communication network. The terminal device  2  includes a browser  20  for displaying a customized webpage in response to input. In one embodiment, the terminal device may be a personal computer, a notebook computer, a mobile phone, a personal digital assistant (PDA), or any suitable communication device. 
     The webpage generation unit  10  may include a plurality of functional modules including one or more computerized instructions that are stored in the storage system  11  and executed by the at least one processor  12 . In one embodiment, the storage system  11  may be an internal storage device, such as a random access memory (RAM) for temporary storage of information, and/or a read only memory (ROM) for permanent storage of information. In some embodiments, the storage system  11  may also be an external storage device, such as an external hard disk, a storage card, or a data storage medium. 
     In one embodiment, the webpage generation unit  10  includes a file folder creation module  101 , a language analysis module  102 , a data translation module  103 , and a webpage generation module  104 . The modules  101 - 104  may comprise computerized code in the form of one or more programs that are stored in the storage system  11 . The computerized code includes instructions that are executed by the at least one processor  12  to provide functions for modules  101 - 104 . In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of application instructions, written in a programming language. The application instructions in the modules may be embedded in firmware, such as an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either application and/or hardware modules and may be stored in any type of computer-readable medium or other storage device. 
     The file folder creation module  101  is operable to create a root folder in the storage system  11 . In the embodiment, the root folder includes a base folder and a plurality of language folders. Each of the language folders includes a webpage file with a corresponding language, such as English, Chinese, and Japanese, for example. The root folder includes a plurality of common webpage files for generating a common webpage. The common webpage files may include a hypertext markup language (HTML) file, a cascading style sheet (CSS) file, a JavaScript file, and an image file. The HTML file records content of the common webpage. The CSS file is used to display different styles of the common webpage on the browser  20 . The image file records image data of the common webpage. The JavaScript file is used to translate the content of the common webpage into data with a required language of the customized webpage. The required language may be English, Chinese, and Japanese, for example. 
     The file folder creation module  101  is further operable to create a symbolic link between each of the language folders and the base folder. In one example with respect to  FIG. 2 , each of the language folders corresponds to one language. The Cn_folder corresponds to a Chinese folder, the Jp_folder corresponds to a Japanese folder, and the En_folder corresponds to an English folder. Each of the language folders includes a customized file with the corresponding language. Each of the customized files records different display styles of a customized webpage displayed on the browser  20  with the corresponding language. In the embodiment, each of the language folders can share with the common webpage files of the base folder through the symbolic link. Such share mechanism can avoid to repeatedly storing same contents of the customized webpage in each of the language folders, so as to save the storage spaces of the storage system  11 . 
     The language analysis module  102  is operable to receive a web address sent from the browser  20  of the terminal device  2 , analyze the web address to determine which language is required by a user, and locate a language folder from the root folder according to the required language. For example, when the user inputs the web address, such as http://www.google.com.cn, the language analysis module  102  determines that the required language is Chinese according to the web address, and locates the Chinese folder (i.e., Cn_folder) from the root folder according to the required language. 
     The data translation module  103  is operable to obtain common webpage files from the root folder through the symbolic link, and translate content of the common webpage files into data in the required language, and store the translated data into a JavaScript file. The data translation module  103  is further operable to determines whether the language folder has a customized file. Upon the condition that the language folder has a customized file, the data translation module  103  reads the customized file from the language folder and adds the customized file to the JavaScript file. 
     The webpage generation module  104  is operable to generate an HTML file corresponding to the required language according to the JavaScript file, send the HTML file to the terminal device  2  for generating a customized webpage, and display the customized webpage on the browser  20  according to the HTML file. 
       FIG. 3  is a flowchart of one embodiment of a method for generating a customized webpage by using the computing device  1  of  FIG. 1 . In the embodiment, the method can generate a customized webpage that adapts to user requirements, and displays the customized webpage on the terminal device  2 . Depending on the embodiment, additional blocks may be added, others removed, and the ordering of the blocks may be changed. 
     In block S 30 , the file folder creation module  101  creates a root folder in the storage system  11 . As mentioned above, the root folder includes a base folder and a plurality of language folders. The root folder includes a plurality of common webpage files for generating a common webpage. The common webpage files may include an HTML file, a CSS file, a JavaScript file, and an image file. 
     In block S 31 , the file folder creation module  101  creates a symbolic link between each of the language folders and the base folder. In one example with respect to  FIG. 2 , each of the language folders corresponds to one language. The Cn_folder corresponds to a Chinese folder, the Jp_folder corresponds to a Japanese folder, and the En_folder corresponds to an English folder. Each of the language folders includes a customized file with the corresponding language. Each of the customized files records different display styles of a customized webpage displayed on the browser  20  with the corresponding language. 
     In block S 32 , the language analysis module  102  receives a web address sent from the browser  20  of the terminal device  2 , analyzes the web address to determine which language is required by a user. In block S 33 , the language analysis module  102  obtains the required language from the web address, and locates a language folder from the root folder according to the required language. For example, when the user inputs the web address, such as http://www.google.com.cn, the language analysis module  102  determines that the required language is Chinese according to the web address, and locates the Chinese folder (i.e., Cn_folder) from the root folder according to the required language. 
     In block S 34 , the data translation module  103  obtains common webpage files from the root folder through the symbolic link, and translates content of the common webpage files into data in the required language. For example, the data translation module  103  reads a common webpage file from the root folder, and translates the content of the common webpage file into data with Chinese. 
     In block S 35 , the data translation module  103  determines whether the language folder has a customized file. If the language folder has a customized file, in block S 36 , the data translation module  103  obtains the customized file from the language folder, and stores the customized file and the translated data into a JavaScript file. Otherwise, if the language folder have no customized file, in block S 37 , the data translation module  103  stores the translated data into the JavaScript file. 
     In block S 38 , the webpage generation module  104  generates an HTML file corresponding to the required language according to the JavaScript file, and sends the HTML file to the terminal device  2  for displaying a customized webpage on the browser  20 . In block S 39 , the terminal device  2  displays the customized webpage on the browser  20  according to the HTML file. 
     Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.