Translating Wedge to Spanish - Need a little help

txcas

  • Bug Zapper
  • Posts: 202
Translating Wedge to Spanish - Need a little help
« 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:


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.

kimikelku

  • Posts: 61

txcas

  • Bug Zapper
  • Posts: 202

Pandos

  • Living on the edge of Wedge
  • Posts: 635
# dpkg-reconfigure brain
error: brain is not installed or configured

txcas

  • Bug Zapper
  • Posts: 202

kimikelku

  • Posts: 61

txcas

  • Bug Zapper
  • Posts: 202
Re: Translating Wedge to Spanish - Need a little help
« Reply #6, on March 5th, 2014, 05:22 PM »
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.  :^^;:
Re: Translating Wedge to Spanish - Need a little help
« Reply #7, on March 5th, 2014, 05:31 PM »
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.
Re: Translating Wedge to Spanish - Need a little help
« Reply #8, on March 5th, 2014, 06:16 PM »
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.
Re: Translating Wedge to Spanish - Need a little help
« Reply #9, on March 6th, 2014, 06:02 AM »
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.

Nao

  • Dadman with a boy
  • Posts: 16,079

txcas

  • Bug Zapper
  • Posts: 202
Re: Translating Wedge to Spanish - Need a little help
« Reply #11, on March 6th, 2014, 03:29 PM »
Quote from Nao on March 6th, 2014, 07:28 AM
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. 

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Translating Wedge to Spanish - Need a little help
« Reply #13, on March 8th, 2014, 12:57 AM »
Quote from txcas on March 5th, 2014, 05:04 PM
Quote from Pandos on March 5th, 2014, 04:56 PM
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.
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".)

Perhaps I could try and remove BOM chars automatically from language files at cache time. I don't even know if it's realistic.

txcas

  • Bug Zapper
  • Posts: 202
Re: Translating Wedge to Spanish - Need a little help
« Reply #14, on March 8th, 2014, 01:50 AM »
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++.