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

Customize language for extension

edited July 2006 in Vanilla 1.0 Help
Language customization of Vanilla 1.0 core is easy with "language packages".
But I would like customize the extension language too.
I've tried to add dictionary entries seen in the extension file in the language.php but it doesn't work.

Does it exist a standard way (without modify extension files) to do that?

Thanks!

Comments

  • Options
    The dictionary entries for extensions are loaded AFTER the language.php in the conf folder. Therefor you need to MOVE the dictionary lines to the language.php.
  • Options
    Sorry but I don't understand your comment.

    If dictionary entries (in the extension files, I suppose) are loaded AFTER those in the language.php, they replace those in the language.php?!?
  • Options
    lechlech Chicagoland
    What jazzman means is: Since an extension has it's own dictionary entries which are stored within the extension itself (ie: inside the default.php for each extension) they gets loaded AFTER the main (global) dictionary is processed. So basically, anything you append to the dictionary at the moment for that extension which already exists, the extensions definition will over-ride the global dictionary definition.
  • Options
    lechlech Chicagoland
    and yes, we know it's confusing for the mean time but it works.
  • Options
    edited July 2006
    Please say just if it's what I must do : So following process is wrong

    for example I've found dictionnary entry in the Iphistory main file (extensions\iphistory\default.php) $Context->Dictionary["IpNotShared"] = "This IP address has not been shared by any other users.";
    I've copied the line in the languages\french\language.php and modified it to $Context->Dictionary["IpNotShared"] = "Cette adresse n'a pas été utilisée par d'autres utilisateurs.";
    But I always have the english version...

    I must change it in extension code, OK?
  • Options
    TreyTrey Charlotte NC New
    you would have to first add the new term --
    $Context->Dictionary["IpNotShared"] = "Cette adresse n'a pas été utilisée par d'autres utilisateurs.";
    to the language.php file, and then remove the old one from within the default.php file.

    What they were saying above is that since the language.php file is loaded before the defualt.php file the dictionary term (ipnotshared) would be overwritten with what was in default.php.
  • Options
    lechlech Chicagoland
    edited July 2006
    if you move it to your french language file, you'll need to simply comment out the definitions you moved to the language file within the extension file.

    (extensions\iphistory\default.php)
    // this is now commented out. // $Context->Dictionary["IpNotShared"] = "This IP address has not been shared by any other users.";
  • Options
    Ok Thanks!
This discussion has been closed.