Translation variable EDITTOPIC
I tried to translate the EDITTOPIC-variable in the view.tmpl but I failed. Where is that variable defined and how can I change it? I just want to translate the EDITTOPIC into another language (german), but I can't find where to do that?!
--
StefanKamps - 20 May 2003
Answer
Please clarify your question - are you trying to translate EDITTOPIC into another language so you can use a more meaningful variable name in that language? Or is it that this variable does not get expanded, or something else?
The variable is defined within
CVSget:lib/TWiki.pm
but changing it is not advisable unless you know what you are doing with Perl and the TWiki code.
--
RichardDonkin - 20 May 2003
I had the same question and was fortunate enough to be able to figure out an answer. I looked in TWiki.pm and could not find the variable Richard referred to. However, after some searching I found that to change the link text (NOT the link itself), you seem to need to go into the "view" CGI script itself--look for the line which defines the $editAction variable. I was able to successfully change "Edit" to "Edit This Page" (thereby making it much more obvious to first-time Wiki users what they have to click on to edit the current page

so changing it to German should be a snap.
If you need to (for whatever insane reason) change the edit link itself, you will need to go into TWiki.pm (look for the EDITURL substitution line), which may have been what Richard was getting at. Richard's caution regarding editing either TWiki.pm or the view CGI script (don't, unless you're comfortable with Perl and TWiki) is good advice, of course. I e-mailed Stefan about this follow-up.
--
AnthonyRThompson - 29 Jul 2003
It might be a little safer to edit the view template file and change the edit there. Replace %EDITOPIC with something like:
<a href= "%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%?t=%GMTIME{"$year$month$day$hours$minutes$seconds"}%" title="Edit this page">Edit this Page</a>
I haven't tried it, but it is concievable that you could define this as a preference (if anybody tries this let us know if it works):
* Set EDITTOPIC = <a href="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%?t=%GMTIME{"$year$month$day$hours$minutes$seconds"}%" title="Edit this page">Edit</a>
The GMTIME parameter is to keep the browser from reloading a cached version of the edit page.
--
MattWilkie - 29 Jul 2003