Author |
Message |
spcdata
Regular


Joined: Jan 24, 2004
Posts: 81
Location: Sweden
|
Posted:
Tue Jun 01, 2004 8:43 am |
|
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  |
_________________ /spcdata |
|
|
 |
soc
Hangin' Around

Joined: Apr 14, 2004
Posts: 26
|
Posted:
Tue Jun 01, 2004 9:10 am |
|
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 |
|
|
|
 |
spcdata

|
Posted:
Tue Jun 01, 2004 9:16 am |
|
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 as You changed it. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Jun 01, 2004 9:27 am |
|
This codeCode:// 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"? |
|
|
|
 |
spcdata

|
Posted:
Tue Jun 01, 2004 9:36 am |
|
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

|
Posted:
Tue Jun 01, 2004 9:44 am |
|
Try changing them both and see if that fixes it. |
|
|
|
 |
spcdata

|
Posted:
Tue Jun 01, 2004 9:59 am |
|
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)
|
Posted:
Tue Jun 01, 2004 10:12 am |
|
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 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! |
|
|
 |
spcdata

|
Posted:
Tue Jun 01, 2004 10:22 am |
|
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  |
|
|
|
 |
prislea
New Member


Joined: May 30, 2004
Posts: 7
|
Posted:
Fri Jun 11, 2004 12:38 pm |
|
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");
}
}
|
|
|
|
|
 |
sixonetonoffun
Spouse Contemplates Divorce

Joined: Jan 02, 2003
Posts: 2496
|
Posted:
Fri Jun 11, 2004 4:18 pm |
|
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. |
|
|
|
 |
prislea

|
Posted:
Fri Jun 11, 2004 4:25 pm |
|
hey that look much better I think this is what I wanted
I am gonna try later
thanks |
|
|
|
 |
BobMarion

|
Posted:
Fri Jun 11, 2004 10:10 pm |
|
WE could include a ton of language files for each language but we know english so they would all need to be translated 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

|
Posted:
Sat Jun 12, 2004 8:18 am |
|
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 ).
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

|
Posted:
Sat Jun 12, 2004 8:28 am |
|
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

|
Posted:
Sat Jun 12, 2004 10:10 am |
|
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


Joined: Dec 28, 2003
Posts: 276
Location: Israel
|
Posted:
Mon Oct 11, 2004 5:56 am |
|
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!!! |
|
|
|
 |
|