Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

Locales not working

edited April 2012 in Vanilla 2.0 Help
This discussion is related to the Skeleton Locale addon.

I am using Version 2.0.18.4, I did everything in order to enable my custom translation. I've a create a new folder under /locales/el-GR/ with my languages, uploaded the baseline files, enabled el-GR under dashboard but I can't see the changes. It's always English.

Any ideas?

Tagged:

Best Answer

Answers

  • peregrineperegrine ☯ hasta luego :) In-Flight MVP

    did you erase the .ini files in your cache?

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. click here for Peregrine | click here for FAQ

  • If you mean clear cache in browser yes I did that.

  • ...nope, sorry I am new here...ok let me check. Thanks for the quick reply.

  • Tried that, didn't work out. I am placing admin.php, vanilla.php files under /locales/ folder. I've changed a couple of definitions inside admin.php, uploaded the files and deleted all /cache/*.ini files but nothing, no change. The only thing that's changing is the Month name. I can see that in Greek.

  • Ok figured it out...I hope it's correct. Place admin.php file under /applications/dashboard/locale/el-GR/admin.php and add the following line

    _1 = "/var/www/cytaforum/applications/dashboard/locale/el-GR/admin.php" _

    in locale_map.ini

    It seems to be working, let me test.

  • peregrineperegrine ☯ hasta luego :) In-Flight MVP

    locale_map.ini is a transitory file, editing it does not solve the ultimate problem and you shouldn't edit them, you should delete ini files - they are caches.

    You may have solved the problem with the admin.php in /applications/dashboard/locale/el-GR/admin.php

    but you certainly didn't fix anything permanently by modifying the ini, since it will get recreated when the cache is rewritten.

    Your'e welcome in advance :). Y'aWIA

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. click here for Peregrine | click here for FAQ

  • Yeah I know you are right...I am trying to figure it out. If I figure this out I will give y an update. Thanks

  • peregrineperegrine ☯ hasta luego :) In-Flight MVP

    Post the contents of your locale_map.ini if you want. I believe the last line is the last one that is acted upon.

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. click here for Peregrine | click here for FAQ

  • peregrineperegrine ☯ hasta luego :) In-Flight MVP
    edited May 2012

    @argyris

    I think I noticed your problem - you put your locale info under the dashboard (wrong location)

    which begs the question - did you re-read this http://vanillawiki.homebrewforums.net/index.php/Internationalization_&_Localization

    it should go under vanilla/locales/el-GR/

    all your new definitions in this file vanilla/locales/el-GR/definitions.php

    after you make all these changes and verifications - delete the mlocale.ini and it should work properly.

    your vanilla/conf/config.php
    

    $Configuration['Garden']['Locale'] = 'el-GR';

    your dashboard should have the default locale as 
    el-GR
    the el-GR should also be enabled.
    
     in vanilla/locales/el-GR/definitions.php - where all your definitions are should have these lines changed
    
        <?php if (!defined('APPLICATION')) exit();
    
    
        $LocaleInfo['el-GR'] = array( // make sure the key of this array is the same as its folder name.
            'Locale' => 'el-GR',
            'Name' => 'el-GR locale',
            'Description' => 'el-GR - my language',
            'Version' => '1.0',
            'Author' => "Zorba",
            'AuthorEmail' => 'none',
            'AuthorUrl' => 'none',
            'License' => ''
            );
    
    
        if (!function_exists('FormatPossessive')) {
           function FormatPossessive($Word) {
              return substr($Word, -1) == 's' ? $Word."'" : $Word."'s";
           }
        }
    
        if (!function_exists('Plural')) {
           function Plural($Number, $Singular, $Plural) {
                // Make sure to fix comma-formatted numbers
              $WorkingNumber = str_replace(',', '', $Number);
              return sprintf(T($WorkingNumber == 1 ? $Singular : $Plural), $Number);
           }
        }
    
        $Definition['Locale'] = 'el-GR';
        $Definition['_Locale'] = 'Locale';
    
        // see bottom of file for el-GR definitions
    

    Monetary Donations will be appreciated if you use my plugins. Thanks in Advance.
    As a waiter gets a tip for a good meal, tips for successful solutions appreciated as well. click here for Peregrine | click here for FAQ

Sign In or Register to comment.