forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: SonjaSt on June 08, 2006, 06:44:06 pm

Title: Photo_Shop plugin: How to add a second language?
Post by: SonjaSt on June 08, 2006, 06:44:06 pm
I just added the great plug-in Photo_Shop provided by Stramm.
(see: http://forum.coppermine-gallery.net/index.php?topic=32231.0)

I am wondering if - and how - I can add a second language?

What I tried is:
1. translated the english.php to german and named it german.php
2. uploaded the german.php to the plugin/photo_shop/language directory

The shop still runs in english. What else do I have to modify to make the german language happen?

Thanks,
Sonja
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: Stramm on June 08, 2006, 07:03:40 pm
open these three files in your plugins/photo_shop dir

photo_shop_admin.php
photo_shop_checkout.php
include/init.inc.php

in these files somewhere near the top find
Code: [Select]
require('plugins/photo_shop/lang/english.php');and replace with
Code: [Select]
if (!file_exists("plugins/photo_shop/lang/{$CONFIG['lang']}.php"))
  $CONFIG['lang'] = 'english';
require "plugins/photo_shop/lang/{$CONFIG['lang']}.php";
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: SonjaSt on June 08, 2006, 07:31:43 pm
Sorry, Stramm, it does not work? All text remain in english.

I updated the three required php files.
In the folder plugins/photo_shop/lang are two files: english.php and german.php

The coppermine database itself has got three languages (english, german, dutch) and works fine.

Sonja
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: Stramm on June 08, 2006, 07:35:13 pm
works for me as expected. Tried with german.php in the plugins lang dir and used the lang selector to switch to german
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: SonjaSt on June 08, 2006, 07:44:17 pm
10 minutes later without changing anything... it works!?
Thanks, Stramm!
(and I keep wondering why it takes so long to show the updated version?)
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: Stramm on June 08, 2006, 07:51:15 pm
lol, I dunno... changes should show up after changes have been done without any delay
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: SonjaSt on June 08, 2006, 07:54:42 pm
That's what I am wondering, too!
Usually, I upload the updated .php or .html to my server. Then open the browser, "call" the page and "refresh" it - and the updated website shows up. This time I had to wait.
Funny,...
Title: Re: Photo_Shop plugin: How to add a second language?
Post by: Joachim Müller on June 09, 2006, 06:31:26 am
Probably browser-caching. Always force-refresh after applying changes ([Ctrl]+[F5]).