osCommerce / oscommerce2

osCommerce Online Merchant v2.x
http://www.oscommerce.com
MIT License
281 stars 222 forks source link

Proposal: Check for local language files first #604

Open mgutt opened 6 years ago

mgutt commented 6 years ago

I checked multiple german Language packs and many of them contain personal changes like (company) names, slogans, etc.

To avoid that I propose to split between general language optimizations and personal local changes.

At the moment I realized it as follows eg includes/languages/german/conditions.php:

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2013 osCommerce

  Released under the GNU General Public License
*/

if (file_exists(DIR_FS_CATALOG . DIR_WS_INCLUDES . 'local/languages/german/conditions.php')) {
    include(DIR_FS_CATALOG . DIR_WS_INCLUDES . 'local/languages/german/conditions.php');
}

define('NAVBAR_TITLE', 'Allgemeine Geschäftsbedingungen');
define('HEADING_TITLE', 'Allgemeine Geschäftsbedingungen');

define('TEXT_INFORMATION', 'Tragen Sie hier Ihre Geschäftsbedingungen ein.');
?>

And includes/local/languages/german/conditions.php contains the following:

<?php
/*
  $Id: conditions.php,v 1.5 2003/07/11 09:04:22 jan0815 Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/

define('TEXT_INFORMATION', '<p>Allgemeine Geschäftsbedingungen und Kundeninformationen<br>
    <br>
    <br>

I. Allgemeine Geschäftsbedingungen

§ 1 Grundlegende Bestimmungen

...

');

?>

It would be nice if a similar system would be part of the osCommerce core.