Loading...
 
Skip to main content

Features / Usability


Customization of Langauge.php

Hello all

I am trying to customize some labels in Tiki Interface. I want to change the label "Find" in page tiki-forums.php.
I edited the lang/en/language.php file and then ran the script get-stings.php?lang=en. At this point, nothing happens, the edited labels does not apear when a load the tiki-forums.php file on browser. For the changes i've made into the language.php file to apear, i have to load and save the tiki-forums.tpl file. Is that standard procedure? In my understanding, after changing a langauge.php file, we just need to run the get-strings.php script.

Any idea out there?

Thanks on advance
Patrick

Hey Clausen, thanks for the quick reply... What cache do you mean? The browser cache? Is there another cache using the TikiWiki Framework?

Do i have to run the get-strings.php script to make my changes active?

Thank you for your time
Patrick


Have you cleared the cache. Nothing happends to the translations until you clear the cache

/Clausen

Hey Clausen, thanks for the quick reply... What cache do you mean? The browser cache? Is there another cache using the TikiWiki Framework?

Do i have to run the get-strings.php script to make my changes active?

Thank you for your time
Patrick

I delete the Browser Cache but the Labels remaining the same. I still have to open, edit and save the appropriate *.tpl file to see my changes! No matter if i ran the get-string.php script.

Clausen is talking about clearing the template caches at your site, I believe. This is done on the System Admin page (tiki-admin_system.php).

About customizing the language file, if you want custom interface terms at your site, you can make a lang/en/custom.php file (or whatever language you're modifying). Tiki will check this file first for the strings, so they'll override the default language file. Copy the exact format of the default file but with your strings and "translations" and save it as "custom.php" in the language's directory. If you do it this way, you won't have to worry about updates overwriting your customized file, etc. Be sure to save the file with your editor configured for utf-8 encoding.

AFAIK, get strings is to find language strings in Tiki's files and isn't involved with implementing them. You should see your changes as soon as the modified file is in place and the site template caches are cleared.

Improving Tiki's English interface language is on the agenda, but is a rather involved job due to the many files involved, so will probably be tackled after version 1.10 is solid.

-- Gary

Hi Gary, emptying the Cache resolves the problem, the changes in the language file shows now properly. The custom.php solution sounds great, however, doesn't work. I did like you said, I duplicated the language.php, I changed the strings, and finally saved it utf-8 / Unix (LF). This is how my custom.php looks like now:

It works, or anyway did the last time I checked. Here's what my test looks like:

Copy to clipboard
< ?php // -*- coding:utf-8 -*- $lang=Array( "default_string" => "my_string", "###end###"=>"###end###"); ? >


-- Gary

here is the script:

< ? php
$lang=Array(
"Find" => "Find:.... custom");
? >