Monday, December 01, 2014

Enabling Language Selector button on IBM Connections


 


โดยปกติเมื่อเราติดตั้ง IBM Connections แล้วเมนูและ User Interface (UI) ต่างๆจะเป็นภาษาอังกฤษ และเมื่อเราต้องการให้ข้อความในเมนูและ UI ต่างๆเป็นภาษาไทย หลายๆคนอาจคิดว่าเราต้อง customize UI ไม่จะด้วยวิธีแก้ properties file หรืออื่นๆ แต่สำหรับ IBM Connections เราไม่ต้องลำบากขนาดนั้นครับ เนื่องจาก IBM Connections รองรับภาษาไทยอยู่แล้ว ระบบจะตรวจสอบ language preference จากค่า locale ที่ตั้งไว้ที่ Browser โดยอัตโนมัติ

อย่างไรก็ตามวิธีการตั้งค่า locale ใน Browser อาจจะยังไม่สะดวกนักในเชิงของการใช้งาน เนื่องจากผู้ใช้บางรายอาจมีความจำเป็นต้องใช้งาน application อื่นๆควบคู่ไปด้วย การตั้ง locale ใน Browser จึงอาจกระทบกับการทำงานของ application อื่นได้ สิ่งที่ง่ายและผมแนะนำให้ใช้คือการเปิดใช้งานปุ่ม language selector ของ IBM Connections ครับ

http://www-01.ibm.com/support/knowledgecenter/SSYGQH_5.0.0/admin/admin/t_admin_common_enable_lang_change.dita?lang=en

ขั้นตอนมีดังต่อไปนี้

1. Connect 'wsadmin' tool ใน Dmgr profile
E:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user wasadmin -password passw0rd

2. Initialize 'connectionsConfig.py' script
wsadmin>execfile("connectionsConfig.py")

3. Check-out file config ออกมาเป็นเพื่อแก้ไข ซึ่งในขั้นตอนนี้จำเป็นที่จะต้องรู้จักชื่อ cell ของ WebSphere Application Server ที่ติดตั้ง connections ด้วยครับถ้าไม่รู้ก็รันคำสั่งต่อไปนี้ครับ

wsadmin>print AdminControl.getCell()
social5Cell01

เอาค่า social5Cell01 มาใส่ใน command checkOutConfig()
wsadmin>LCConfigService.checkOutConfig("E:/configuration","social5Cell01")

4. ใน folder E:/configuration จะได้ file LotusConnecitons-config.xml และ .xsd ออกมา ให้เปิด .xml ด้วย TextEditor

5. มองหา tag ครับ จากนั้นกำหนดค่า
    - enabled="true"
    - defaultLanguage="en"
    ส่วนจะให้เลิกใช้ภาษาอะไรได้บ้างก็ copy เอามาจาก comment ได้เลยครับ




6. เสร็จแล้วรันคำสั่ง checkInConfig()
wsadmin>LCConfigService.checkInConfig()

7. restart connections server

E:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>stopServer.bat connections_server
E:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>startServer.bat connections_server

 จะพบว่ามี Language Selector แสดงขึ้นมาดังรูปครับ

 


No comments: