PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
spcdata
Regular
Regular


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

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

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
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 Back to top

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
Regular
Regular


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

PostPosted: Tue Jun 01, 2004 9:16 am Reply with quote Back to top

I have replaced the code in "// Load required lang file" with the one from Setinel(tm) 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.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
spcdata
Regular
Regular


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

PostPosted: Tue Jun 01, 2004 9:36 am Reply with quote Back to top

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");
}
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Jun 01, 2004 9:44 am Reply with quote Back to top

Try changing them both and see if that fixes it.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
spcdata
Regular
Regular


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

PostPosted: Tue Jun 01, 2004 9:59 am Reply with quote Back to top

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(tm) 1.0 ? in that one you don't have to make the changes manually.
View user's profile Send private message Send e-mail Visit poster's website
BobMarion
Former Admin in Good Standing


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

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

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.
View user's profile Send private message Send e-mail Visit poster's website
spcdata
Regular
Regular


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

PostPosted: Tue Jun 01, 2004 10:22 am Reply with quote Back to top

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
View user's profile Send private message Send e-mail Visit poster's website
prislea
New Member
New Member


Joined: May 30, 2004
Posts: 7

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

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: 2499

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

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
New Member
New Member


Joined: May 30, 2004
Posts: 7

PostPosted: Fri Jun 11, 2004 4:25 pm Reply with quote Back to top

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

thanks
View user's profile Send private message
BobMarion
Former Admin in Good Standing


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

PostPosted: Fri Jun 11, 2004 10:10 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
prislea
New Member
New Member


Joined: May 30, 2004
Posts: 7

PostPosted: Sat Jun 12, 2004 8:18 am Reply with quote Back to top

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
View user's profile Send private message
prislea
New Member
New Member


Joined: May 30, 2004
Posts: 7

PostPosted: Sat Jun 12, 2004 8:28 am Reply with quote Back to top

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
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Sat Jun 12, 2004 10:10 am Reply with quote Back to top

You can add the same code to the block right below the die() statement and it should also work for switching languages.
View user's profile Send private message
ring_c
Involved
Involved


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

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

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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum