Language problems - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Language problems (/showthread.php?tid=60868) |
Language problems - El Forum - 07-16-2014 [eluser]margsot[/eluser] Hi i have a file called theme.php and in this file i have this line Code: $LANG['sources_HAVE_AN_ACCOUNT'] = "Have an account?"; Now in file called votes.php uses the code Code: if($r) //voting done to perform a vote function for a specific article. The problem is that when you click on the vote button the text "Have an account?" doesn't appears!! Why is this happens? Where is the problem? Language problems - El Forum - 07-16-2014 [eluser]Tim Brownlaw[/eluser] Well just as an aside your function would look a little better like this... ( or course there are other ways to do this ) Code: if($r) //voting done Is $r definitely a Boolean - TRUE/FALSE... Also you could get a bit more creative on naming $r to something more meaningful as you seem to have done on your $LANG indexes! But that's a minor point. To the meaty bits! Now I am assuming that your statement... Quote:The problem is that when you click on the vote button the text “Have an account?” doesn’t appears!!means that this code is then run. Now are you Certain that $LANG['sources_HAVE_AN_ACCOUNT'] exists when this code is executed. And do the other $LANG[] values show up as expected? If you were to put in a Code: var_dump($LANG); That's about all I can suggest at the moment. Cheers |