Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 29. Mar 2024, 08:21

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: start with my language
PostPosted: 7. May 2009, 20:10 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
hello twg

It seems that TinyWebGallery is very nice. I'm trying it now locally. Now I cannot do one thing - sorry if it is all clear but I somehow missed it - how to open index.php in my language without argument (index.php?twg_lang=lv)? I have language/language_lv.php, I even tried to force $lang_browser = 'lv'; in index.php and tested that $default_language = $lang_browser; was executed. All the same by default the page starts English. Any help?

Andra


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:08 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Set

$default_language = 'en';

in the config to your language. TWG tries to detect the prefered language you have set in the browser. If this is not detected the setting above is used.

When you are done with your language please sent the language file to me to include it it the next build.
I can give you a nice flag in your language in the same style as the others as well.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:29 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
Oh, this was the first I tried. In config.php. That I described was just more complicated actions to do something.
What I am not sure - maybe I miss some more "_lv" file? In root folder I don't have any lv language specific file; there are three files in folder "language" (language_lv.gif, language_lv.php, language_lv.txt); a file in folder "pictures" (folder_lv.txt). And in those _lv there are latvian texts, I can get them if I choose lv flag, but I cannot get open Latvian by default.
Thanks, but :(

And I did logout TWG Administration. I even clear browser cache.


Last edited by Andra on 7. May 2009, 22:34, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:33 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
what is the default language of your browser ?

if you only like your language remove the other language files.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:37 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
Maybe then it would be one language - my own. But I was already very glad that in such an easy way (really nice program!) I would get English version also to be able to choose.


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:39 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
What is the default language of your browser - seems to be english - therefore english is selected.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:42 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
removed files folder.txt, language_en.txt, language_en.php, language_en.gif. Tried to open index.php, received fatal error "...Failed opening required....../language/language_ag.php". Why "_ag"???


Last edited by Andra on 7. May 2009, 22:53, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:48 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
mmm, yes, that's that I described in my first message - I tried to force $lang_browser, but! I did my experiments one by one, so $default_language in config.php was back to original. Now I believe I could force them both. Sorry for being such nuisance to you! Just in my country it is not very usual thing that computer GUI in every way is localized.

Nooo, it did not help...
Now when removed English files, the error is normal:
"...Failed opening required..../language/language_en.php"


Last edited by Andra on 7. May 2009, 23:00, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 22:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I again ask you: What is the default language of YOUR browser?

in index.php you will find:
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$lang_browser = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if (file_exists(dirname(__FILE__) . '/language/language_' . $lang_browser . '.php')) {
$default_language = $lang_browser;
}
}

which checks this.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 23:02 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
it is English but I force
$lang_browser = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$lang_browser = 'lv'; //piespiedīšu būt LV by default

and I checked that if branch executed:
if (file_exists(dirname(__FILE__) . '/language/language_' . $lang_browser . '.php')) {
$default_language = $lang_browser;
error_log("iegaja ifaa");error_log($default_language);error_log(" This is Andra !!! ");
}


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 23:07 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The language is stored in the session once it is set. You might only have to close your browser and retry.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 23:09 
Offline

Joined: 7. May 2009, 20:02
Posts: 47
Location: Latvia
Yes, thank you, that was it! Restart browser.


Last edited by Andra on 8. May 2009, 17:40, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2009, 23:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
;).

Have fun using TWG.
You can complete the language file if you have some time - only a couple of lines are left ...

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


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 post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy