Author Topic: Reading variables from language file (Not anymore in 1.7.10!)  (Read 4627 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Reading variables from language file (Not anymore in 1.7.10!)
« on: November 22, 2011, 11:06:35 AM »
Hello,

Before I update my gallery to 1.7.10 (From 1.7.7), I used variables in the language file. For example:
$lang['image_city'] = "The city is " . $image_place . " "
It was always working, but not anymore.
(Not only for one variable, but for all the variables I use in the language file.

Does the new version works different?

Ik hope I get some help, because my gallery looks like a mess.

Thanks in advance,
Cruxy

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Reading variables from language file (Not anymore in 1.7.10!)
« Reply #1 on: November 22, 2011, 01:48:07 PM »
It depends where your variables are defined. If you want to use them, you'll need define them before language files are included, which means it must be done in global.php

If not, then you'll need use some tags instead of variables and replace them with your variables value later on.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Reading variables from language file (Not anymore in 1.7.10!)
« Reply #2 on: November 22, 2011, 02:02:15 PM »
Thanks V@no, but I did not change anything before the update.

Does the version 1.7.10 works different?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Reading variables from language file (Not anymore in 1.7.10!)
« Reply #3 on: November 22, 2011, 02:11:23 PM »
What version did you use before? and where are your variables defined?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Reading variables from language file (Not anymore in 1.7.10!)
« Reply #4 on: November 22, 2011, 02:15:08 PM »
I was using v1.7.7.

The variables are defined on for example: contact.php, send_suggestion.php, mail_us.php...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Reading variables from language file (Not anymore in 1.7.10!)
« Reply #5 on: November 22, 2011, 02:18:35 PM »
ok, but at which point they are defined? after global.php included or before?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)