Loading...
 
Skip to main content

Features / Usability


How do I change the name "Categories" to something more appropriate for my website?

Hi there,

would love any help on this matter.

I need to change the names "Categories" and "Show categories" to something more appropriate for my website but I cannot work out how to do this.

Any advice?

Thanks in advance.

Probably the easiest way to do this is to use a custom language file. Since all of TikiWiki's interface terms are (or can be) translated, you can specify what you want the English translations of "Categories" and "Show categories" to be at your site. The same method can be used for any of the supported languages, of course.

If you look at this file: lang/fr/custom.php_example, you can see how a Tiki language file looks. Note that each line of terms contains two sets of terms in quotation marks. The first is the term to be translated, the second is the translation that you want to appear, and they're seperated by the equal sign and greater-than character, and followed by a comma.

Lines beginning with double slashes in the example file actually won't be used; start your lines with no slashes in order for your terms to be used. (Sorry, but I don't know what your knowledge of code is.)

So copy the example file or make a new file with the same content and save it as custom.php. It needs to be placed in the lang/en/ directory, to be used for English. (Its path will be lang/en/custom.php.)

In the place of, or just following, the double-slash lines in the example file, your new lines will be:

"Categories"=>"Term X",
"Show categories"=>"Phrase Y",

where Term X and Phrase Y are the terms that you want to be used at your site. Be sure to use a text editor that will save the file with utf-8 encoding. If other character encoding is used, it may cause a fatal error at your site. Well, if this happens by any chance, just remove or rename your custom.php and things will be back to normal.

-- Gary

Hi Gary,

That's very helpful. I have managed to successfully do half of your instructions and, given I am not a coder, will try and sort out the rest. Failing that, I'll ask a developer to do it for me.

And I have to say at this stage, the developer looks like he is going to get the job.

Unless you want to do it???

Cheers,

Verica

www.cityhobo.comQuestion


Do you mean changing the name "categories" to have the page display a name such as "cool stuff" ? if so you would need to log in as admin then go to normal view of categories yoursite.com/tiki-browse_categories.php then at top next to the word Categories click the edit template icon, a new page will open. Change the line below changing only the underlined words with the name you wish and then save.
the { have --{-- just so you can see code yours will not have.

{title}{if $parentId ne 0}{--tr}Category{/tr} {$p_info.name}{else}{--tr}Categories{/tr}{/if}{/title}

I think Gary's method would probably be much easier, safer and faster for you though 😊 Since mine would require you to edit the menus as well.

I think you are right and Gary's information is easier to digest for a non coder but I still appreciate your reply. Cheers.

One advantage of using the custom language file, apart from the process itself being pretty easy, is that it isn't touched by site upgrades. If you modify a template file, then upgrade your site with a new Tiki release, the file will probably be overwritten and you'd have to modify it again.

Also, language files change every instance of the translated term (everywhere it is used in templates, etc. inside "translate tags") so will be automatically changed in menus, etc.

Well, veevee, this gets into the grey area between free advice and billable time 😉 but, since it's so small, if you let me know through pm or email (gary at tikiwiki dot org) what terms you want to use at your site, I'll make the custom.php file and send it you.

-- Gary