HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Problem with localization

HypocriteHypocrite New
edited October 2011 in Localization
Hello,

I have started translating Vanilla Forums into Finnish.

The problem is that I can't get my installation to translate.

I have also tried to add the German language from the addons and enable it. I have enabled both languages and tried setting both as the default locale.

Everything in my installation stays in English.

What would I be doing wrong?

Thanks.
Tagged:

Answers

  • I have made another installation of Vanilla forums and I have again the same problem.

    I have tried enabling and disabling the translation. I have also cleared the cache files several times.

    What could I try next?

  • When trying to debug this I noticed that locale_map.ini had the following content:

    [fi-FI]
    0 = "/public_html/keskustelut/conf/locale.php"

    When I added my translations to this file, the translation works.

    But why does it add a line like that?

    Shouldn't it be something like:

    [fi-FI]
    0 = "/public_html/keskustelut/locales/finnish/locale.php"

  • You have to be able to write to config, to set config. Check the file settings. chmod 775

    grep is your friend.

  • I am not sure if it's a permission issue.

    I have the following permissions:
    cache/ folder = 777
    conf/config.php = 775

    The problem is the cache/locale_map.ini file which is not generated correcly. If I delete the file and let the system create it again, it is always generated with just the locale.php file from the conf folder and not with the translation files from the locale folder.

    I added these manually to the file and now it works ok:
    [fi-FI]
    2 = "/locales/finnish/captured_admin.php"
    1 = "/locales/finnish/captured.php"
    0 = "/conf/locale.php"

    But the file is not generated correcly automatically.

  • You named your file wrong.

    it should be locales/finnish/definitions.php

    make sure you have

    $LocaleInfo['finnish'] = array(
       'Locale'       => 'finnish',
    

    grep is your friend.

  • That's not the problem.

    I have done that and I have also definitions.php file in the folder. That did not make a difference.

    Originally I had both locale.php and definitions.php but now I have the parsed files from the Baseline translation.

    Now I have:
    definitions.php
    captured.php
    captures_admin.php

    http://vanillaforums.org/docs/localization says that you can have several files in the folder with translations.

  • I actually also tried with downloading different translations from this site. None of them worked when trying to enable them.

  • what does you $LocaleInfo look like and what is the name of the folder?

    grep is your friend.

  • Have you set as default locale as well as enabling it. Make sure you are naming somethign different so there isn't a conflict.

    grep is your friend.

  • HypocriteHypocrite New
    edited February 2012

    LocaleInfo:

    $LocaleInfo['Finnish'] = array (
      'Locale' => 'fi-FI',
      'Name' => 'Finnish',
      'Description' => 'Finnish translation of Vanilla forums.',
      'Version' => '1.0',
      'Author' => 'Heikki Ylipaavalniemi',
      'AuthorEmail' => 'heikki@concrete5cms.fi',
      'AuthorUrl' => '',
      'License' => 'GPL2',
    );
    
  • HypocriteHypocrite New
    edited February 2012

    Yes, I have tried setting the default locale.

    My config.php says this:

    // EnabledLocales
    $Configuration['EnabledLocales']['Finnish'] = 'fi-FI';
    

    But there is no setting for the default locale. Although in Dashboard fi-Fi is selected.

  • try setting

      $Configuration['Garden']['Locale'] = 'fi-FI';
    

    aswell

    grep is your friend.

  • HypocriteHypocrite New
    edited February 2012

    It is still not working.

    If I use the conf/locale.php, the translation works.

    But if I put the locale.php to the finnish locale folder, nothing gets translated.

  • and the folder name is Finnish or finish?

    grep is your friend.

  • HypocriteHypocrite New
    edited February 2012

    Folder name is finnish.

    Also tried with Finnish/finnish. Didn't make a difference.

  • are you sure > Hypocrite said:

    LocaleInfo:

    $LocaleInfo['Finnish'] = array (
      'Locale' => 'fi-FI',
      'Name' => 'Finnish',
      'Description' => 'Finnish translation of Vanilla forums.',
      'Version' => '1.0',
      'Author' => 'Heikki Ylipaavalniemi',
      'AuthorEmail' => 'heikki@concrete5cms.fi',
      'AuthorUrl' => '',
      'License' => 'GPL2',
    );
    

    look at the last comma. that shouldn't be there to be valid php.

    after that...well I guess you have going to have to deductively problem solve.

    I would start with fresh install, Do everything by the book. Use defintions.php not locale.php

    grep is your friend.

  • Yes, I actually removed that extra comma after noticing it myself.

    And I do have definitions.php, not locale.php.

    The weird thing is that I have two installations on the same host. Other one is working, this one is not.

    But I never figured out what fixed the other installation.

  • I guess you have work backward to figure it out.

    There might eb something unique to you setup that could not be anticipated.

    It is always good to try thing out on localhost, then at leas you know whether it can work.

    grep is your friend.

Sign In or Register to comment.