Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
You should grab 2.1.9, released 18 March. It's what all the cool kids are doing.

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

  • did you erase the .ini files in your cache?

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

  • peregrineperegrine MVP
    Answer ✓

    Not your browser, on the server.

    e.g.
    /vanilla/cache/locale_map.ini

    you should try deleting all the .ini files

    did you read this
    http://vanillawiki.homebrewforums.net/index.php/Internationalization_&_Localization

  • ...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.

  • 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

  • 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

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

  • peregrineperegrine 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
    

Sign In or Register to comment.