---
title: "php 多语言 gettext问题以及解决"
author: "lucklrj"
date: "2015-03-28T02:25:55Z"
tags: []
categories: ["编程语言"]
slug: "php-gettext"
draft: false
lastmod: "2015-03-28T02:25:55Z"
id: 2196700
url: "https://lucklrj.iteye.com/blog/2196700"
---

产生的po文件,以utf8无bom保存，

```java
msgfmt -o default.mo default.po --verbose
default.po: warning: PO file header missing, fuzzy, or invalid
            warning: charset conversion will not work
found 1 fatal error

```

将po文件以多种格式保存，均如此。多方无解，最后安装virtaal.exe，打开po产生的mo可以正常使用。

命令行编译的mo可以用virtaal打开，但应用无法翻译，不明原因。