pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

user language #2138

Open liuronghuan opened 10 years ago

liuronghuan commented 10 years ago

my local languages is Chinaese . i can see that there are Chinaese package in the file but the magement dashbord is still english how can i set it thanks

Shelob9 commented 10 years ago

Have you defined Chinese as the language for WordPress? http://codex.wordpress.org/Installing_WordPress_in_Your_Language

If so Pods should use whatever Chinese translations are available, and fallback to English when none are provided. If you'd like to contribute to the Chinese translations, please sign up for an account at http://wp-translate.org/ and give us your username and we will add you as a translator.

liuronghuan commented 10 years ago

maybe it is a bug i am sure that i have defined chinese for my wp ,finally i find that u did not set __or_e in the language file

Shelob9 commented 10 years ago

@liuronghuan You are correct. I test and when WP_LANG is set to 'zh_CN' no translations occur. When set to 'es_ES' successfully translated to Spanish. So it looks like the issue has to do specifically with Chinese translation.

I also tried rolling back to 2.3.18 and issue is present in there as well.

I am relabeling this as a bug and re-assigning to @sc0ttkclark.

sc0ttkclark commented 10 years ago

If the language file is there, isn't that all it needs? /languages/zh_CN.mo /languages/zh_CN.po

pavelevap commented 10 years ago

Compiled file zh_CN.mo is somehow corrupted. I am not sure how it was created, but does not work. When you open zh_CN.po file in Poedit software and create correct zh_CN.mo file, then everything works well. I also tried to decompile wrong .mo file with msgunfmt, but final .po file was also corrupted. Maybe there are some problems related to compiling header or Chinese characters, I am not sure. How is this file automatically created?

Shelob9 commented 10 years ago

@pavelevap The translations are generated by GlotPress (http://wp-translate.org/). Our project page is http://wp-translate.org/projects/pods/dev If I understand correctly, to regenerate the translation files we have to do a new release.

pavelevap commented 10 years ago

Yes, you have to regenerate translation files and add them to new installation package, because current zh_CN.mo file is somehow corrupted.

I tried to manually export current .po and .mo file for zh_CN and it works well. Do you have any automatic script to export all translation files from GlotPress or do you export them manually and rename them?

pavelevap commented 10 years ago

This was probably fixed in 2.4.1, language files were regenerated. I tried them and zh_CN works well.