在Mac OSX中添加语言环境 [英] Add a locale in Mac OSX

查看:90
本文介绍了在Mac OSX中添加语言环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MAMP环境中使用gettext.我有es_ESca_ESen_USgl_ES的语言环境文件.前三个没有问题,但是对于第四个,尝试将语言环境翻译文件绑定到gl_ES语言(西班牙的加利西亚语)时出现错误.这对apache或PHP来说不是问题,因为其他的都可以工作(并且在我的CentOS服务器中,我有gl_ES软件包并且工作正常)

I'm using gettext in a MAMP environment. I have locale files for es_ES, ca_ES, en_US and gl_ES. No problem with the first three, but for the forth, I get an error when trying to bind the locale translations files to the gl_ES language (galician in Spain). This is not a problem with apache or PHP because the others work (and in my CentOS server I have the gl_ES package and works fine)

因此,我意识到我的 Mac OS X版本10.6.8没有加利西亚语支持.这很奇怪,因为它支持西班牙的另外三种官方语言:西班牙语,加泰罗尼亚语和Euskera.一些终端向您展示:

So I realize my Mac OS X version 10.6.8 came without Galician support. That's strange because it has support to Spanish, Catalan and Euskera, the other three official languages in Spain. Some terminal to show you:

$ locale -a | grep _ES
ca_ES
ca_ES.ISO8859-1
ca_ES.ISO8859-15
ca_ES.UTF-8
es_ES
es_ES.ISO8859-1
es_ES.ISO8859-15
es_ES.UTF-8
eu_ES
eu_ES.ISO8859-1
eu_ES.ISO8859-15
eu_ES.UTF-8
$ ll /usr/share/locale/ | grep _ES
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 ca_ES/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 ca_ES.ISO8859-1/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 ca_ES.ISO8859-15/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 ca_ES.UTF-8/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 es_ES/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 es_ES.ISO8859-1/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 es_ES.ISO8859-15/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 es_ES.UTF-8/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 eu_ES/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 eu_ES.ISO8859-1/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 eu_ES.ISO8859-15/
drwxr-xr-x   8 root  wheel   272B  3 dic  2010 eu_ES.UTF-8/

回归

  • 我尝试了安装盘(添加语言包),但没有成功:它们只是操作系统的翻译版本.
  • 我找到了这个类似的问题,但没有足够的信息,也没有好的答案.
  • 我选择使用 localedef ,但似乎仅用于在已有基础文件时创建.UTF-8或类似文件.
  • Regression

    • I tried the installation disks (adding language packs) but no success: they're just translations of the operating system.
    • I found this similar question, but doesn't have as much information and no good answers.
    • I came to localedef as an option, but it seems to be just for creating the .UTF-8 or similar when you already have the base file.
    • 我不知道如何向Mac OS X添加加利西亚支持(或其他任何支持).

      I have no clue on how to add galician support (or any other) to Mac OS X.

      如何在Mac OS X中添加新的语言环境?

      How to add a new locale in Mac OS X?

      推荐答案

      这应该可以解决问题:

      cd /usr/share/locale
      sudo cp -R es_ES gl_ES
      

      然后打开一个新的终端会话,并再次列出区域设置.加利西亚人应该在那里:)

      Then open a new terminal session and list the locales again. Galician should be there :)

      这篇关于在Mac OSX中添加语言环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆