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.

language file oddness

edited April 2007 in Vanilla 1.0 Help
so i made my own Danish.php, and edited nearly everything but the administration stuff. i also edited the "Sticky" text, but now i changed my mind, i want it to say something else again, but i can't find it again! i also can't find out where to edit the "phantom" text. and it also looks like there's no way to edit the "xx minutes ago" to something else. ...or is there?

Comments

  • The Text for Sticky (and bookmark, closed etc.) you set in your admin settings.

    "xx minutes ago etc." are in definitions.php around line 450 beginning with $Context->Dictionary['XDayAgo']

    What do you mean by "phantom text"? Some text definitions are in the respective extension default.php files.
  • "phantom" as in "x phantom users" (in the who's online) i just realised that that must be in the extension files... duh! ;) thanks for the other help!
  • Dont forget to upload your translation to the addons dir for others to use :)
  • am i retarded, or is there no definitions.php? (0.9.2)
  • it's your danish.php or whatever you're using. definitions.php is in 0.9.3 where languages are in seperate folders i think.
  • oh well, then i can't find it! searching for "dayago" or "minute" or "hour" or any of that gives me: "Done. Not found in the current document."
  • Hmm. That just might be one of the things which mark forgot to include in the language file when he stripped all references out before 0.9.2.6 to make vanilla multi-lingu-able. There was a dictionary overhaul for 0.9.3 to change the structure of certain things and include a few bits he's missed.

    I hate to tell you, but if you were doing a translation you'd really have been best working with the 0.9.3 files :(
  • aw crap... what i did was going to the website, downloading the file on the frontpage, and installing vanilla 0.9.2... guess i'll have to wait for 1.0 for that.
  • edited May 2006
    Well i believe the file which needs translating is http://lussumo.com/svn/vanilla/trunk/languages/English/definitions.php as thats from the new version. I'd wait for someone to confirm that though.
  • MarkMark Vanilla Staff
    correctamundo
  • Sorry, I should have said that my comments refer to v1.0.

    For what it's worth, the definitions.php for the soon to come v1.0 is a good deal shorter than the 0.9.2... version and uses much of the same text.
  • I have some oddness too,

    I added to the http://lussumo.com/svn/vanilla/trunk/languages/English/definitions.php file the following

    $Context->SetDefinition('ApplyForMembership', 'Sign me up');


    as it says in the docs

    and it displays

    $Context->SetDefinition('ApplyForMembership', 'Sign me up'); at the top of the page instead of the changing the ApplyForMembership text

    :(

    what have I done wrong ?
  • edited April 2007
    In a language file, you should add new entries like this: $Context->Dictionary['ApplyForMembership'] = 'Sign me up';

    Although, preferrably you should add it to /conf/language.php, instead of /languages/English/definitions.php so it won't get overwritten when you upgrade.
  • let me revise my post

    I haven't touched the definitions.php

    what I have done is added

    $Context->SetDefinition('ApplyForMembership', 'Sign me up');

    to the conf/language.php in order to override the existing values (as it says in the docs)

    and rather than over riding the the existing values it just displays the text I added

    $Context->SetDefinition('ApplyForMembership', 'Sign me up');

    bjrn are you saying that to the docs are wrong and I have to create a completely new language set just to overide a few values
  • brjn,

    I just read your edit

    I have now put $Context->Dictionary['ApplyForMembership'] = 'Sign me up'; in the /conf/language.php

    and it displays $Context->Dictionary['ApplyForMembership'] = 'Sign me up'; on the top of the page

    should the be something else in the file ?
  • If you have no other custom dictionary entries, /conf/language.php should look like this:
    <?php $Context->Dictionary['ApplyForMembership'] = 'Sign me up'; ?>
  • ahh, that explains the problem.

    i'm a muppet

    Thanks bjrn you have saved me from my own stupity.
  • strangely it works, now that I have put the php code within the php tags

    *smacks self round head*
This discussion has been closed.