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.

Locale & translations

2»

Comments

  • @Mark
    Thanx for your quick reply. Recently you fixed a translation issue on github (http://github.com/lussumo/Garden/commit/3ca8325497d01776891adefe490db954482ed926). But where can I translate this? I didn't find the phrase in applications/garden/locale/en-CA/definitions.php.
    For people wondering what a pull request is: http://github.com/guides/pull-requests .
  • MarkMark Vanilla Staff
    @Silencer - In order to translate it, you just take the string that was passed into the Gdn::Translate() function and assign accordingly. If you just want to make a few changes here and there, you can use the conf/locale.php file to make the changes. If you want to make an entirely new translation locale, make the appropriate folder within the locale folder and add a "definitions.php" file within. You'll need to assign that locale after you've created it. You do that through the conf/config.php file with the Garden.Locale setting.

    Your translations appear in either of those places like this:
    <?php if (!defined('APPLICATION')) exit();
    $Definition['Apply for Membership'] = "Register Now!";
    $Definition['Sign In'] = 'Login';
  • SilencerSilencer New
    edited March 2010
    @Mark
    Thank you so much! A few more questions:
    1. What is better for php: 'Login' or "Login"?
    2. There are different locale folders with "definitions.php". In "conversations" it has one value ($Definition['RecipientUserID'] = 'recipient';), in "skeleton" no value and in "vanilla" no value as well (the copyright is missing here). Most values are in the "/applications/garden/locale/en-CA/definitions.php". Can I put everything here, so I just have to take care of one "definitions.php" or do I have to make multiple files in the corresponding folders?
    3. I found a bug (login screen is empty after wrong password) when entering german umlauts here:
    $Definition['ErrorCredentials'] = "z.B. ü";
    Edit: The umlaut issue was caused by the wrong file encoding. Important: it has to be UTF-8 without BOM! If you use the notepad++ editor (which is very good btw), you can open the file and go to "encoding" => "convert to UTF-8 without BOM".

    It would be great if we could make a single "definitions.php" with all necessary values for translation as a template. This could people put in their "/applications/garden/locale/new-language/" folder after translation.

    @Clough
    It would be great if you could post your "definitions.php" and we search and post the rest of the missing values from the Gdn::Translate() functions throughout the software.
  • OH MY GOD! Why it is too hard to translate Vanilla 2?!!! Vanilla 1 had a definitions file and we could easily translate it to our language.
    I installed Mark's addon but I got fatal error about database table. I did as S said but again an error about syntaxes...
    could you write a simple structure about translating Vanilla 2 ???
  • lucluc ✭✭
    v2 is not out yet.
    It will be easier to translate once it's out, but the translation part is not the focus of the developpers right now, it will be later when it's closer to release.

    I'm pretty sure Mark and the other devs will make something nice to work with in order to translate v2/garden.
  • I'll probably not install this forum only because of all the headache around the translation...
    It's a pity, because it looks like a nice forum platform.
    A PO file would be very handy.
Sign In or Register to comment.