no way to translate

  1. 6 years ago
    Edited 6 years ago by hajduk

    there are no strings in the definitions.php file to translate:

    1. Right button "Following" / "Follow"
    2. Months names in the right side
    3. Log In page: word "Forgot" near Password field
    4. Likes plugin. When I click "Unlike" the link "Like" became non-translated
    1. there is just no english translation file.
    2. Month names come from a php function (see: %B at ), just set your locale right.
    3. definitions.php
    $definitions["Forgot?"] = "Forgot?";

    4. the like and unlike is hardcoded in the javascript file, without translate function

    1. I guess it should be added
    2. in definitions.php I see:
    ET::$languageInfo["Russian"] = array(
    	"locale" => "ru-RU",

    does not it set php locale?

    1. Thank you! Lost it there
    2. Need to fix, no?
  2. Edited 6 years ago by ciruz

    Looks like the month stuff is not perfect right now. :)

    esoTalk will not set any locale information for you, and you have no chance to modify the months with a simple translation file, but the php function strftime() who returns the months, will allways use this locale information.

    I have some quick and dirty temporary solutions for you, only that you can test your stuff (this is not a final solution):

    1. If you have a own server/vserver, run your apache with another locale information (see: )


    2. Set the locale inside your esotalk/index.php before the bootstrap gets loaded:

    setlocale (LC_ALL, 'ru_RU');

    your index.php should look something like this now:

    // OMG FIRST COMMENT!!!11!
    // Copyright 2013 Toby Zerner, Simon Zerner
    // This file is part of esoTalk. Please see the included license file for usage information.
    define("IN_ESOTALK", 1);
    define("PAGE_START_TIME", microtime(true));
    define("PATH_ROOT", dirname(__FILE__));
    define("PATH_CORE", PATH_ROOT."/core");
    define("PATH_CACHE", PATH_ROOT."/cache");
    define("PATH_CONFIG", PATH_ROOT."/config");
    define("PATH_LANGUAGES", PATH_ROOT."/addons/languages");
    define("PATH_PLUGINS", PATH_ROOT."/addons/plugins");
    define("PATH_SKINS", PATH_ROOT."/addons/skins");
    define("PATH_UPLOADS", PATH_ROOT."/uploads");
    setlocale (LC_ALL, 'ru_RU'); //here you go
    require PATH_CORE."/bootstrap.php";

    and try it again

  3. just tried 2nd way -- no, does not work

  4. Edited 6 years ago by ciruz

    Are you sure that it doesn't work? It just changes the month (the setlocale stuff, is just a temporary fix for the second point on your list), see example:


  5. Edited 6 years ago by hajduk

    deleted space before braces

    setlocale(LC_ALL, 'ru_RU'); //here you go

    now months are russian, but their encoding is wrong and I see hieroglips there, look:

  6. Ok thats bad, you need to set a different encoding too.

    Whatever, then please rollback to the default setting (remove locale) :)
    Changes in the code are not the solution, we have to accept that the month stuff is just not ideal right now.

  7. ok, thx
    waiting for solution

  8. 5 years ago
    Edited 5 years ago by Tristan

    Sorry to bump this old conversation. How can we translate the hard coded text inside javascript files?
    Maybe one solution would be to load a different js file depending on the chosen language?

    Found the solution :)

    Send arguments as language definition keys

    $sender->addJSLanguage("Like", "Unlike");

    and use it so:

    area.find(".like-button").html(area.hasClass("liked") ? T("Like") : T("Unlike"));

or Sign Up to reply!