Forums / General Questions / languages installed - how to preserve?

languages installed - how to preserve?

Locked

Started by hareslade on 3 Jun 2007, 9:27 PM · Views: 1,127

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
3 Jun 2007, 9:27 PM
#1
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

languages installed - how to preserve?

Hi
Not criticism, not criticism (just so I make myself clear)

I recently deleted a (second) language from a test cart and I discovered once you do that, there's no chance of reinstating it because the delete language process rips out most of the references to that language i.d from the database.

So... it would be a solution if there could be a 'status' icon on the admin language lists, which only stops that language from showing in the cart languages sidebox, but retains all the database entries for it..

Then one could retain languages and work on them in admin mode, but not have them show..

There must be a simple way of inhibiting a cart side language, would just hiding the appropriate cart language icon be a solution?

3 Jun 2007, 10:55 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: languages installed - how to preserve?

You ahould b able to install this or another language from th admin that will re write the DB configuration for it

Zen-Venom Get Bitten

4 Jun 2007, 1:02 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: languages installed - how to preserve?

hareslade, you are correct ... deleting a language via the admin will delete all database content related to that language ... in products, categories, reviews, etc etc etc. It does a complete cleanup.

If you prefer to control the list of languages in the storefront sidebox, you can make your changes in the /includes/templates/YOURTEMPLATE/sideboxes/tpl_languages.php file, by adding the highlighted line:```
while (list($key, $value) = each($lng->catalog_languages)) {
[B] if (in_array($key, array('en', 'fr', 'tw'))) continue;
[/B]

You can list as many languages as you wish to NOT offer from your normal list of installed languages, just by extending or reducing the array.

You'll still be able to access them by adding &language=fr to your storefront URL, but they will not show up in the sidebox and therefore will stop most from using them unexpectedly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.