How to support Multi-language in Oracle ?
Here is the steps which I followed to achieve for capturing multiple language into Oracle data base as well as view the same on the UI pages.
Steps to set the default character-set to support UTF-8 in Oracle database:
- Connect to the Oracle data base using SYS user using command prompt.
- Check the character-set value of the database by using below command.
The above command should return the result with AL32UTF8. If not means we need to set it.
- To set the character-set to AL32UTF8, Use the below command, If already done or present by default means can skip this step.
Update Sys.Props$ Set VALUE$='AL32UTF8' Where NAME='NLS_CHARACTERSET';
- Restart the database using following command once the changes had been done for character-set using above step.
shu Immediate;
startup;
Steps to add/change configuration file in web application:
Once we done with the changes to the database is not sufficient to enable or support multi language, We need to add Character Encoding Filter in configuration file of web.xml (If you are working with spring or servlet based application).
configuration file (web.xml) |
Configuration in application server (Apache tomcat):
Although by following above steps we can make any application to work in multilingual (read/write/post/log to database), but to make data table view/filter, we need to configure the UTF-8 encoding in configuration file of tomcat too.
Configuration in server.xml file |
That's all. After following all the above steps, you should be able to support your web application with any language like log the data entered in any language to database, view the page data fetching from database with any stored language.
No comments:
Post a Comment