安装软件包
Java代码
- apt-get install gettext
把openstack_dashboard简体中文汉化.rar解压
把../openstack_dashboard/django.po上传到
/usr/share/openstack-dashboard/openstack_dashboard/locale/zh_CN/LC_MESSAGES
把../horizon/django.po上传到
/usr/share/pyshared/horizon/locale/zh_CN/LC_MESSAGES
编译2个语言包
Java代码
- cd /usr/share/openstack-dashboard/openstack_dashboard/locale/zh_CN/LC_MESSAGES
- msgfmt --statistics --verbose -o django.mo django.po
- cd /usr/share/pyshared/horizon/locale/zh_CN/LC_MESSAGES
- msgfmt --statistics --verbose -o django.mo django.po
链接语言包
Java代码
- cd /usr/lib/python2.7/dist-packages/horizon/locale/zh_CN/LC_MESSAGES
- ln -s /usr/share/pyshared/horizon/locale/zh_CN/LC_MESSAGES/django.mo django.mo
重启服务
Java代码
- sudo service apache2 restart