Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to translate extension???

edited November 2009 in Vanilla 2.0 - 2.8
I don't understand how to translate extension. I tried putting translation lines into global lang. file and I tried creating conf/my_language.php in several places in tree. I just can't figure it out / it's not working ??

And BTW there's nowhere some clear instructions. At least not in the visible area.

Please help!

EDIT: Using Vanilla 1, Thanks!

Comments

  • $Context->Dictionary['Members'] = 'Members'; $Context->Dictionary['Username'] = 'Username'; $Context->Dictionary['Email'] = 'Email'; $Context->Dictionary['Posts'] = 'Posts'; $Context->Dictionary['Registered'] = 'Registered';

    Ok, this code was in plugin's default.php. I changed that into

    $Context->SetDefinition('Members', 'Members'); $Context->SetDefinition('Username', 'Username'); $Context->SetDefinition('Email', 'Email'); $Context->SetDefinition('Posts', 'Posts'); $Context->SetDefinition('Registered', 'Registered');
    Like it says in documentation for plugin developement, and now I'm able to use /conf/language.php to override default strings like it says here.

    If this is the way to do it, I'm not sure how this helps, when I change global language in forum settings, plugins language is not reseted / I need to put comment in /conf/language.php, otherwise my changed strings remains ???

    This way I can edit the plugins default.php directly, is the same thing :confused:
  • edited November 2009
    Ok I've figured it out :)

    If I put translation into /languages/<my_language>/definitions.php then the plugin language change along with global forum language.

    Question: Why plugin developers don't use SetDefinition function for defining their strings instead of Dictionary?
Sign In or Register to comment.