Advertisement:

Author Topic: $txt[\'moderate\'] bug?  (Read 6763 times)

Offline dfelix

  • Semi-Newbie
  • *
  • Posts: 16
$txt[\'moderate\'] bug?
« on: March 19, 2008, 01:03:11 PM »
Is there any know issue related to the $txt['moderate'] variable?

It seem to work only when English language selected.
On other language files, this variable is ignored and no description is shown on the menu.

I already duplicated the  index.english.php, renamed it to index.portuguese.php changing  only the lang_locale, lang_dictionary and lang_spelling ... and moderate variable doesn't work either...


Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: $txt['moderate'] bug?
« Reply #1 on: March 19, 2008, 01:08:37 PM »
When altering txt strings (outside of smf language editor).
This is a note/tip I posted in the Charter Members section a whileback and so am copying it here.

Quote
Ok, I've just spent an hour or two trying to work out why a language string I added wasn't showing.

In SMF 2.0 smf has its own caching functionality.
It appears to cache the language files for use. (and no browser forced refresh will clear it)

So if your planning to develop mods which involve editing the template/language files directly (eg via Notepad++)
Then before starting it would be recommended to

a) Disable SMF caching via
Admin > Server Settings > Caching (tab)
Set Caching Level to No Caching

b) Clear existing cache
Admin > Forum Maintenance > Common Tasks (tab)
Under 'Miscellanous'
Click the link to "Empty the file cache".

Now no cache will be created whilst your creating your mods so everytime you create/change a language string the changes will be shown.

Once you are finished, if necessary, reset the Caching level back.

Offline dfelix

  • Semi-Newbie
  • *
  • Posts: 16
Re: $txt['moderate'] bug?
« Reply #2 on: March 19, 2008, 05:17:47 PM »
Thank you so much, karlbenson...
That was exactly the problem..


« Last Edit: March 19, 2008, 05:28:17 PM by dfelix »