Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

filebrowser: International Characters

edited August 2005 in Vanilla 1.0 Help
So I'm running filebrowser and I've got filenames and what not in spanish (with characters with accents on them). And also the description of the site in _config.xml is also in spanish. filebrowser b0rks the display completely. ideas? should i step through the code and check it out?

Comments

  • Options
    MarkMark Vanilla Staff
    edited July 2005
    Open up your index.php file and add this line above "error_reporting(E_ALL);":

    // PROPERLY ENCODE THE CONTENT header ("content-type:text/html;charset=utf-8");

    See if that does the trick.
  • Options
    incidentally, i have "manually" fixed this by changing the encoding in the resulting page from index.php to iso-8859-1. It may be that _config.xml is not UTF-8 but that doesn't explain why the file names are also screwy. (actually this my friend's site, and i'm just helping him work out bugs). I assume he editing _config.xml with Notepad. Does notepad save Unicode encoded files?
  • Options
    it was indeed trying to encode it as utf-8, but wasn't showing up properly under that encoding.
  • Options
    MarkMark Vanilla Staff
    Oh wierd!
  • Options
    Hey, so, I've decided to try and add "localizations (localisations for those of you across the ocean)" to filebrowser. That is, create a "string" file, and put something in the config that will make it show up properly. Do you already have something in mind for this, or should I just do it and post a link to the patch file. The idea is in the config xml file i'd have something like <Language>es</Lanuage> and then in a folder called _localization i'd have a file called es.php with all the strings localized to spanish.
  • Options
    MarkMark Vanilla Staff
    Please go ahead and do it. Send me the code when you're done and I'll see about integrating it :)
  • Options
    edited July 2005
    http://www.idioticbrilliance.com/files/

    It's the changedfiles.tar in there. I opted not to have diffs, because..well I was too bothered to go that far.

    I've included english and spanish.

    Basically it's a function called GetLocalizedString that you pass the string to. If it can't find it in the strings database, it returns the key. Based on what you have in the config file, it will read the appropriate file in the Languages Folder.

    I simply added one more field to the the config file called . It defaults to english.

    Uh. yeah. If you have any questions..feel free to email, or of course post here.
  • Options
    edited August 2005
    I also made a spanish translation, but I did it the old way: hacking the index.php file. There are a couple of spots where I truly feel my translation makes more sense to the users in general. Check it out at http://www.qpd.cl/galeria/ * the note telling the user that the image is rezised: Nota: el tamaño de esta imagen fue modificado para que cupiese en esta pantalla. Haz click aquí para ver la imagen en su tamaño original. * the footnote: Desarrollado por Mark O'Sullivan *Save, Copy url, etc: Guardar Copiar URL Copiar código <img> * several (I'd say most) of the error messages. there are still a few lines I missed. I'm going to get into them and update the link posted
This discussion has been closed.