Tried to solve it the whole evening ... in vain.
When I save a core language file (e.g. zh_tw.php), even without any change, it messes up the layout. The whole margin on left disappears. There are some other mess-up, too, like the "Search" word in the blank box will move half way down.
The reason I encountered this problem is that I need to amend a few translations from the original downloaded language pack plugin. But as soon as I save the amended core language file, this problem appears.
Tried saving it with ANSI, Unicode, UTF8 with Notepad. None worked.
Help please. Thanks!
Jeff
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Jeff Hao@haostaff
Jeff Hao - 0 likes
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Evan Winslow@ewinslow
Evan Winslow - 0 likes
- Jeff Hao@haostaff
Jeff Hao - 0 likes
- iionly@iionly
iionly - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Jeff Hao@haostaff
Jeff Hao - 0 likes
- iionly@iionly
iionly - 0 likes
- Jeff Hao@haostaff
Jeff Hao - 0 likes
You must log in to post replies.There may be one of these infecting your files:
http://en.wikipedia.org/wiki/Byte-order_mark
Also, zh_tw doesn't look like a legit language file. All language files I know are supposed to be 2 characters only.
Thank you Evan. It is indeed the BOM problem, I think. I replaced the Chinese language with another pack (Simplified Chinese) from "sidealice" http://community.elgg.org/pg/plugins/project/385030/developer/sidealice/-chinese-language-pack-for-elgg-171-full . It is now working without problem. I can now edit and save the files for my own customisation. I can also adapt the files into Traditional Chinese pack.
By the way, zh_tw may be correct. It stands for Taiwan Chinese (Traditional characters). There is also zh_hk (Also traditional characters). "zh" for Chinese (Simplified characters).
I understand that those combinations of letters may accurately represent what you're going for, but Elgg doesn't know how to handle them, IIRC. It doesn't have that kind of localization support.
Or does it?
Sorry, Evan, I am totally "crossing the river by feeling the stones for every step" (Chinese). They work for my site. But I don't even fully understand the significance of your question, as I am a music teacher only, totally ignorant of programming.
@Jeff: I think what Evan means is that Elgg can only handle language files with two letter file names (i.e. en.php but not xy_en.php as an example). What might work is to rename the language files of zh_hk.php to zh.php. Then you would also need to adjust the array names in the language files:
$traditionaltw = array(
.....
add_translation("zh",$traditionaltw);
Also, you need to add the line
"zh" => "Traditional Chinese",
at the language list at the bottom of Elgg's main language file.
ISO 639-1 (which Elgg uses) -> dictates 2-char language codes.
Thanks to all. But now everything seems to work fine for me at my site http://iplay.haostaff.com
I am using Jeroen Dalsem 's Language Selector plugin. As for the language files, I named Chinese Simplied zh.php, and named Chinese Traditional zh_hk.php. All seems to be working great.
iionly, when you say "Elgg can only handle ...", what does it mean? Is there potential language functions that I might be missing?
@Jeff: if it works now it's alright. I just thought that Evan meant to say that Elgg would expect the language files to have only two character names and would not work correctly otherwise. But you seem to have proved that's not the case. I'm glad you got it working. :)
Cheers, iionly :). This community rock.