Wedge
Public area => The Pub => Topic started by: txcas on March 5th, 2014, 04:28 PM
-
I am working on the Spanish translation for Wedge. I completed the index.spanish.php and admin.spanish.php files. I am not sure what is wrong with the files, when I add the language special characters show in a funny way and the Spanish language does not get used at all. Here is an example:
(http://www.carloss.us/pictures/languages.png)
Everywhere I have a Spanish character or an accent it shows as a diamond with a question mark in it. I thought my files might have been encoded incorrectly (I used Visual Studio to create them), so I used Notepad2 to encode them from ansi to utf-8. That made no difference. I compared my files to the ones in English and French and can't figure out what's causing this problem. If I open for example admin.spanish.php within wedge, every accent is messed up and I am able to retype them there and they look good. I would like to figure out what is going on before I start translating other files.
-
Strange mine shows up
(http://i.imgur.com/493HVHN.png)
But now that i added the language if i choose back English the forum language doesn't change.
-
What do you use to edit the files? I should probably share my files somewhere...
-
Did you save it with UTF-8 decoding?
-
Did you save it with UTF-8 decoding?
Based on Notepad2, they are encoded as UTF-8 but I have my doubts. I you want to check, they files are hosted here(http://www.carloss.us/spanish.zip).
-
Its working here
(http://i.imgur.com/Am8onjq.png)
-
Excellent, thank you for testing it! The problem must be on my sandbox server. I should probably reinstall the whole thing. What a relieve, I can stop drinking now. :^^;:
-
Well, it looks like it might be my host. My production site has the same issue. I will do a brand new Wedge installation and see what happens, since my sites have data imported from SMF.
-
Everything reinstalled and same problem. I am not sure what is wrong on my host. I can use French just fine, but my own Spanish files won't work. Frustrating. I will keep translating and figure this one out later.
-
Darned I found the problem! I downloaded Notepad++ and encoded my language files from utf-8 to utf-8 without BOM. That took care of the funky characters. I guess I will stop using Notepad2. Time to go to bed.
-
Seriously..? Notepad2 doesn't do BOM. Are you sure you saved them to utf8 while within notepad2? Are you sure you're using Florian's version or the mod version?
-
Seriously..? Notepad2 doesn't do BOM. Are you sure you saved them to utf8 while within notepad2? Are you sure you're using Florian's version or the mod version?
Yes the files were encoded as utf-8, that is what was driving me crazy. I could not find anything wrong with them. I am using the MOD of Notepad2 and is does not have an enconde as utf-8 with no BOM option.
-
Notepad2 and Notepad++ are two different programs.
-
Did you save it with UTF-8 decoding?
Based on Notepad2, they are encoded as UTF-8 but I have my doubts. I you want to check, they files are hosted here(http://www.carloss.us/spanish.zip).
Just so you know... These files, there, are shown in Notepad2 as being ISO-8859-1.
Regarding saving as UTF, please note that there are two options in Notepad2:
- Save as UTF-8 (regular, no headers)
- Save as UTF-8 with Signature (this is "UTF-8 with BOM(https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8)".)
Perhaps I could try and remove BOM chars automatically from language files at cache time. I don't even know if it's realistic.
-
Thanks, I will try that. I am still editing them in Notepad2 because Notepad++ sucks for editing, but after I am done, I encode them to utf-8 with no BOM with Notepad++.