Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ Bug Reports
Author Message
spcdata
Regular
Regular


Joined: Jan 24, 2004
Posts: 81
Location: Sweden

PostPosted: Tue Jun 01, 2004 8:43 am Reply with quote

Hi!

I upgraded to Sentinel 110 and noticed that my default language on my site where in English but I use Swedish as default....

I have copied the lang-english.php and named it lang-swedish.php so I have them both but still after clearing my cahe and go to ma page it is in English.


What I did to make Swedish defalt again is a little change on line 49 in Sentinel.php

Code:
if(!isset($lang)) { $lang = "english"; }


changed to swedish

Code:
if(!isset($lang)) { $lang = "swedish"; }


I post this if there is any oters that have the same problem Wink

_________________
/spcdata 
View user's profile Send private message Send e-mail Visit poster's website
soc
Hangin' Around


Joined: Apr 14, 2004
Posts: 26

PostPosted: Tue Jun 01, 2004 9:10 am Reply with quote

same here, and if i delete lang-english.php from sentinel folder, leaving there Only my language's file, it says

Quote:

Fatal error: main(): Failed opening required 'language/sentinel/lang-english.php'

in ........../html/includes/sentinel.php on line 53



A solution is that spcdata said
 
View user's profile Send private message
spcdata
PostPosted: Tue Jun 01, 2004 9:16 am Reply with quote

I have replaced the code in "// Load required lang file" with the one from Setinel™ 1.0 and that works fine, and I don't have to go into the code and manualy change it.

I wonder if there is a problem with this part of code Question as You changed it.
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Tue Jun 01, 2004 9:27 am Reply with quote

This code
Code:
// Load required lang file

if(!isset($lang)) { $lang = "english"; }
if (!eregi("\.","$lang") AND file_exists($lang_dir."language/sentinel/lang-$lang.php")) {
  require_once($lang_dir."language/sentinel/lang-$lang.php");
} else {
  require_once($lang_dir."language/sentinel/lang-english.php");
}
has 2 occurrences of the word "english". Did you change BOTH to "swedish"?
 
View user's profile Send private message
spcdata
PostPosted: Tue Jun 01, 2004 9:36 am Reply with quote

No I just changed the first one like this:


Code:
// Load required lang file 

if(!isset($lang)) { $lang = "swedish"; }
if (!eregi("\.","$lang") AND file_exists($lang_dir."language/sentinel/lang-$lang.php")) {
  require_once($lang_dir."language/sentinel/lang-$lang.php");
} else {
  require_once($lang_dir."language/sentinel/lang-english.php");
}
 
Raven
PostPosted: Tue Jun 01, 2004 9:44 am Reply with quote

Try changing them both and see if that fixes it.
 
spcdata
PostPosted: Tue Jun 01, 2004 9:59 am Reply with quote

I only had to change the first one to make it work and it's the same if I change them both to swedish it does not matter, but the question is why you have change the working "lang code" from Setinel™ 1.0 ? in that one you don't have to make the changes manually.
 
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Tue Jun 01, 2004 10:12 am Reply with quote

There were problems with some sites even finding the lang file so it was changed. Please remember we are still fine tuning some sections of the script and the lang section is one of those Sad We may very well revert back to the old code or maybe a modified copy of the old code.

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
spcdata
PostPosted: Tue Jun 01, 2004 10:22 am Reply with quote

Very Happy there is no problem for me about this just wanted to make a notice about it for the records, and so other users can find a temporary solution for it Wink
 
prislea
New Member
New Member


Joined: May 30, 2004
Posts: 7

PostPosted: Fri Jun 11, 2004 12:38 pm Reply with quote

the language problem is not solved for me maybe because I dont use english language on my site?
I want to use this code but I am not a coder and something is wrong can u ppl look at it?

Code:
// Load required lang file

$language = $nuke_config['language'];
if (!isset($lang)) { include_once($lang_dir."language/sentinel/lang-english.php");}
     elseif{ (!eregi("\.","$lang") AND file_exists($lang_dir."language/sentinel/lang-$lang.php")) {
  include_once($lang_dir."language/sentinel/lang-$lang.php");}
  else {
 include_once($lang_dir."language/sentinel/lang-$language.php");
  }
}
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Fri Jun 11, 2004 4:18 pm Reply with quote

This "seems" to work if language is set not english but there is no language file to load it loads the english file.
Code:


// Load required lang file
if(!isset($lang)) { $lang = "{$nuke_config['language']}"; }
if (!eregi("\.","$lang") AND file_exists($lang_dir."language/sentinel/lang-$lang.php")) {
  require_once($lang_dir."language/sentinel/lang-$lang.php");
} else {
  require_once($lang_dir."language/sentinel/lang-english.php");
}


I should mention the alternative language files need to be in the /language/sentinel/ directory to be found.
 
View user's profile Send private message
prislea
PostPosted: Fri Jun 11, 2004 4:25 pm Reply with quote

hey that look much better I think this is what I wanted Very Happy
I am gonna try later

thanks
 
BobMarion
PostPosted: Fri Jun 11, 2004 10:10 pm Reply with quote

WE could include a ton of language files for each language but we know english so they would all need to be translated Wink Plus with the work on 2.0.0 proceding the language file is changing some so we would have to include english in each version until there were translated files to provide. Over at NukeScripts.net I have a section that users can upload translations to for any script out there and I would be happy to package the translations with the master package when and if there are some posted.
 
prislea
PostPosted: Sat Jun 12, 2004 8:18 am Reply with quote

for start u can copy the english language to all other languages.
I dont know where the script use all the definitions from language file maybe u can split that in 2 files
messages for admin,blocks and normal use of the site in one file
messages to hackers/baned ppl in other file, or not in a language file, this can be only in english from my part (or brazilian Laughing ).

for next version maybe u can take in consideration the $newlang or $currentlang I dont know what is used when u choose from select language block, like I say I am new to this.

thanks
 
prislea
PostPosted: Sat Jun 12, 2004 8:28 am Reply with quote

prislea wrote:
for next version maybe u can take in consideration the $newlang or $currentlang I dont know what is used when u choose from select language block, like I say I am new to this.


u can forget this is working good like sixonetonoffun made it.

EDIT
hmm just tested the block (I dont use) but there is not working then again maybe u must look intoo this also
 
sixonetonoffun
PostPosted: Sat Jun 12, 2004 10:10 am Reply with quote

You can add the same code to the block right below the die() statement and it should also work for switching languages.
 
ring_c
Involved
Involved


Joined: Dec 28, 2003
Posts: 276
Location: Israel

PostPosted: Mon Oct 11, 2004 5:56 am Reply with quote

Just wanted to say thanks.
My site uses Hebrew, and suddenly users are complaining the encoding has changed to Western English.

Looking at this chain solved my problem, though I'm using Sentinel 2.02 and the langauge line at the code didn't match the first mentioned.

In my sentinel.php the line was:
Code:
if(!isset($lang)) { $lang = {$nuke_config['language']}; }


changing it to:
Code:
if(!isset($lang)) { $lang = "hebrew"; }

solved my problem.

thanks again!!!
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ Bug Reports

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©