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.

Howdy stranger changes using Locale technique

Howdy!

"<?php if (!defined('APPLICATION')) exit();

$LocaleInfo['skeleton']=> array( // make sure the key of this array is the same as its folder name.//
'Locale' => 'en-CA',
'Name' => 'definitions',
'Description' => 'This is a skeleton of a locale pack. If you want to create your own locale pack copy and rename this folder into your locales folder.', "

This is what I have with all the definitions below this section. What should it read like? The definitons.php file is the name of the file and its located in [public html/applications/skeleton/locale/en-CA/defintions.php]
It isn't being read and when I try and do it via the template the drop down menu isn't active and no selections can be made.

what do I need to change, its driving me crazy. Thanks

Tagged:
«1

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    If you are changing the meaning of the words, I highly suggest you put them in /conf/locale.php. This file gets loaded automatically and will override in place translations.

    Example locale file:

    <?php if (!defined('APPLICATION')) exit();
    $Definition['Howdy, Stranger!'] = 'Welcome to our Community!';
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Hi, I've tried changing using the locales but without success. The conf folder doesn't have a locales file. are you suggesting I save the definitions file and rename it locale and then put it in the conf folder?

  • just put the definitions file in the conf folder... no joy

  • hgtonighthgtonight ∞ · New Moderator

    If you are just changing the wording and not translating it to another language, put all the definitions into /conf/locale.php. That file doesn't ship with Vanilla, but if it exists, Vanilla will load it after all other locale files.

    For example, my community prefers the "Sticky" terminology, so I use the following /conf/locale.php file:

    <?php if (!defined('APPLICATION')) exit();
    $Definition['Howdy, Stranger!'] = 'Welcome to our Community!';
    $Definition["GuestModule.Message"] = "If you want to take part in the discussions, sign in or apply for membership below!";
    $Definition['Announcement'] = 'Stickied';
    $Definition['Announce'] = 'Sticky';
    $Definition['Unannounce'] = 'UnSticky';
    $Definition['Latest Commented'] = 'Latest Posts';
    $Definition['Dashboard'] = 'Manage';
    $Definition['Home'] = 'Forums';
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I already have a definitions file where I've made all the changes. Could you give me the full address for the location of where I should put this file? Is it in the 'bittersweet theme' folder or is it [public html/conf/myfilename.php]
    thanks

  • <?php if (!defined('APPLICATION')) exit();

    $Definition['Howdy Stranger'] = 'Welcome to J.A.M. Forums!';
    $definiton['GuestModule.Message'] = 'Sign up to join the J.A.M';
    $definition['Register'] = 'Sign Up';
    $definition['Categories'] = 'Forums';
    $definitions['category'] = 'forum';
    $definitions['Category Filter'] = 'Forum Filter';
    $definitions['All Categories'] = 'All Forums';

    This is what I have, plus some other definitions.

    what do I do with the file?

  • hgtonighthgtonight ∞ · New Moderator

    Find the folder that have Vanilla's index.php. This is your forum root.

    Put your definitions in forumroot/conf/locale.php.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • yes, thats where it is. [public html/conf/locale.php]
    Do I need to do something with this as well?

    <?php if (!defined('APPLICATION')) exit();

    "$LocaleInfo['skeleton'] = conf ( // make sure the key of this array is the same as its folder name.
    'Locale' => 'conf',
    'Name' => 'locale',
    'Description' => 'This is a skeleton of a locale pack. If you want to create your own locale pack copy and rename this folder into your locales folder.',
    'Version' => '2.0.1',
    (etc)
    $Definition['Howdy Stranger'] = 'Welcome to J.A.M. Forums!';
    $definiton['GuestModule.Message'] = 'Sign up to join the J.A.M';
    (etc)

    Thanks

  • hgtonighthgtonight ∞ · New Moderator
    edited February 2015

    That isn't even a valid PHP file. Remove everything but the opening application guard (<?php if (!defined('APPLICATION')) exit(); and your definitions (lines starting with $Definition).

    Also, Capitalization of keys and variables is important.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • okay, well this was in the master version in the files on my computer, and it isn't the file that I uploaded into conf/ earlier. I wondered if it was needed as it wasn't working but seemingly not. What do you mean by capitalisation of keys and variables?

  • "Locales allow you to support other languages on your site. Once a locale has been added to your /home/danu_ps/public_html/locales folder, you can enable or disable it here."
    Default Locale [drop down box]
    Locale Definitons"

    In dashboard: This is found under the locales menu but the drop down box is empty, and so locales can't be uploaded by this method either. Is it just not working or should some action be taken to activate it?

  • Any more help from anyone on this please?

  • R_JR_J Ex-Fanboy Munich Admin

    You already have been pointed to this very extensive tutorial: http://vanillaforums.org/discussion/26597/tutorial-how-to-change-wording-how-to-change-text-how-to-change-language-how-to-change-locale/p1
    There you have an example of a valid /conf/locale.php

    Here you also have been told how your file should have to look like: http://vanillaforums.org/discussion/comment/225888/#Comment_225888

    If you like to, I can also tell you how to do that, but I guess that's not what you need ;)

    At the end of the discussion (not of the comments, but of the opening post) there is a chapter for troubleshooting: http://vanillaforums.org/discussion/26597/tutorial-how-to-change-wording-how-to-change-text-how-to-change-language-how-to-change-locale/p1
    Have you followed the steps there?

  • yes

  • I have this file:
    <?php if (!defined('APPLICATION')) exit();

    $Definition['Howdy Stranger'] = 'Welcome to J.A.M. Forums!';
    $definiton['GuestModule.Message'] = 'Sign up to join the J.A.M';
    $definition['Register'] = 'Sign Up';
    $definition['Categories'] = 'Forums';
    $definitions['category'] = 'forum';
    $definitions['Category Filter'] = 'Forum Filter';
    $definitions['All Categories'] = 'All Forums';

    In this folder:
    [public html/conf/myfilename.php]

    It won't upload.

  • R_JR_J Ex-Fanboy Munich Admin

    @peregrine said:

    Troubleshooting

    when modifying locales or adding locale files - always clear the ini files in the /cache folder - for best results.

    to see if you are reading the files you think you are reading for locales.

    look at the contents of

    cache/locale_map.ini

    if your locale file is not listed you are not reading it !

    so if the cache/locale_map.ini

    has this

    ****cache/locale_map.ini ****

    0 = "public_html/forum/locales/ViVN/definitions.php"

    and you are wondering why your definitions in conf/locale.php are not being read, it is because you need to delete the
    cache/locale_map.ini

    What about that?

  • Yes I read this and as you say we these two threads have merged into one. I'm just looking at your comments on the master.tpl thread. I tried to clear the cache and it said permission denied error 3, so it could be that is the problem. I'm going to switch over to the other thread...

  • hgtonighthgtonight ∞ · New Moderator

    @Sar said:

    In this folder:
    [public html/conf/myfilename.php]

    It won't upload.

    The file needs to be called locale.php.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • The file is called locale.php. The file won't load, wherever I put it.

  • hgtonighthgtonight ∞ · New Moderator

    If it won't upload, that is an issue with file permissions and your site's server admin should be able to sort it out for you.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.