TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,991
  • Total Topics: 21,323
  • Online today: 545
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 306
  • Total: 307
  • @rjen

question about adding words into languagefiles

Started by jensderknipser, March 17, 2007, 06:22:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jensderknipser

As I was in charge to add additional words into the recent language-files (de - en) it seems not to be a problem. I've added i.e. into index.german-utf8.php

$txt[JJ002] = 'Nutzungsbedingungen';

and the same into the respective english file. So everything is working, these 'new# words appears as they should - but in the error-log there's this message for any time, these 'new' words where called by the script:

Quote8: Use of undefined constant JJ002 - assumed 'JJ002'
/Applications/MAMP/htdocs/picts-online-live/Themes/exodus11_tp/index.template.php (eval?)
84

And this is, what is proposed at the top:
QuoteApplying Filter: Error message '8: Use of undefined constant JJ002 - assumed 'JJ002'
/Applications/MAMP/htdocs/picts-online-live/Themes/exodus11_tp/index.template.php (eval?)
84' (Clear filter)

This is not doing anything worse except that my db will be filled up with data very fast....
I thought before adding new words, that there should be additional defines to to, but at the moment I have no idea, where to to this. Can somebody hel me?

Thanks in advance

jens
smf1.1.2; TP 0.9.7.1

IchBin

#1
any time you put letters in the array element it automatically becomes a string so you need to make it like this.
$txt['JJ002'] <-- notice the single quotes. Now if you had just numbers in there you wouldn't need the single quotes.

jensderknipser

#2
Thank you IchBin,
I think now I will never see  these error-messages again :)
jens

This website is proudly hosted on Crocweb Cloud Website Hosting.