justme1 Posted February 20, 2006 Posted February 20, 2006 Hi! 1. Im making a store, but the date in the bottom of the store is in english. My store gonne be whole swedish. Where can i change the month- and dayname to swedish? i looked at the jsp file but i didnt find anything. Help me please. 2. When you are making a account, you must write you personal number. In sweden we write yyyymmdd1234 (1234 is control number, a must). Instead of writing dd/mm/yyyy. How do i change it and where? Thanks for all answers. Cincerly Justme1
Marc_J Posted February 20, 2006 Posted February 20, 2006 Hi!1. Im making a store, but the date in the bottom of the store is in english. My store gonne be whole swedish. Where can i change the month- and dayname to swedish? i looked at the jsp file but i didnt find anything. Help me please. 2. When you are making a account, you must write you personal number. In sweden we write yyyymmdd1234 (1234 is control number, a must). Instead of writing dd/mm/yyyy. How do i change it and where? Thanks for all answers. Cincerly Justme1 I think format settings like these are all in catalog\includes\languages\yourlanguage.php and catalog\admin\includes\languages\yourlanguage.php. Also look in catalog\create_account.php for the create account problem. Looks like it sucks to be Swedish - what next, they insert a chip at birth?
justme1 Posted February 20, 2006 Author Posted February 20, 2006 I think format settings like these are all in catalog\includes\languages\yourlanguage.php and catalog\admin\includes\languages\yourlanguage.php. Also look in catalog\create_account.php for the create account problem. Looks like it sucks to be Swedish - what next, they insert a chip at birth? But i will not help me thou i will translate monday, tuesday wendsday to swedish and january, february, mars to swedish. where can i find the code who writes or loop this?
Marc_J Posted February 20, 2006 Posted February 20, 2006 But i will not help me thou i will translate monday, tuesday wendsday to swedish and january, february, mars to swedish. where can i find the code who writes or loop this? I'm not entirely sure, but it might be something to do with the setlocale at the start of catalog\includes\languages\yourlanguage.php... Mine looks like this (for UK settings): - // look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Examples: // on RedHat try 'en_US' // on FreeBSD try 'en_US.ISO_8859-1' // on Windows try 'en', or 'English' @setlocale(LC_TIME, 'en_UK.ISO_8859-1'); // #Credits to Brian Sim (aka Simmy) http://www.oscommerce.com/forums/index.php?showtopic=129520&st=0&p=520992# define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } Which I think I got from a variety of sources and contribs...so far back I can't remember. Try changing these for the Swedish formatting. Remember to do the same in catalog\admin\includes\languages\yourlanguage.php. Also one or more of these contribs might help you: - http://www.oscommerce.com/community?contri...sh&category=all
Guest Posted February 20, 2006 Posted February 20, 2006 dates are changed automatically because of the locale. Seems you're not setting up the language correctly. i looked at the jsp file but i didnt find anything and what jsp file you were looking at?
Marc_J Posted February 20, 2006 Posted February 20, 2006 At a guess, the start of your svenska.php files should be: - <?php /* $Id: english.php,v 1.106 2003/06/20 00:18:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // look in your $PATH_LOCALE/locale directory for available locales.. // on RedHat6.0 I used 'en_US' // on FreeBSD 4.0 I use 'en_US.ISO_8859-1' // this may not work under win32 environments.. setlocale(LC_TIME, 'sv_SE.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } // Global entries for the <html> tag define('HTML_PARAMS','dir="ltr" lang="sv"'); // charset for web pages and emails define('CHARSET', 'iso-8859-1'); // page title
justme1 Posted February 20, 2006 Author Posted February 20, 2006 Hi!1. Im making a store, but the date in the bottom of the store is in english. My store gonne be whole swedish. Where can i change the month- and dayname to swedish? i looked at the jsp file but i didnt find anything. Help me please. 2. When you are making a account, you must write you personal number. In sweden we write yyyymmdd1234 (1234 is control number, a must). Instead of writing dd/mm/yyyy. How do i change it and where? Thanks for all answers. Cincerly Justme1 now i have changed the personal number, question 2. but question 1 is still remaining. Can you help me with that? instead? as i said i have solved question 2.
Seagoofy Posted February 21, 2006 Posted February 21, 2006 now i have changed the personal number, question 2. but question 1 is still remaining. Can you help me with that? instead? as i said i have solved question 2. Check your file: catalog\includes\languages\swedish.php if You don't have it, You don't have Swedish in your shop. If so, find a language pack from the contributions and install. I'm presuming You have installed the Swedish language pack, and you have the catalog/includes/languages/swedish.php. It starts with something like this: <?php /* $Id: english.php,v 1.106 2003/06/20 00:18:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // look in your $PATH_LOCALE/locale directory for available locales.. // on RedHat6.0 I used 'en_US' // on FreeBSD 4.0 I use 'en_US.ISO_8859-1' // this may not work under win32 environments.. setlocale(LC_TIME, 'sv_SE.ISO_8859-1'); The critical part is this: setlocale(LC_TIME, 'sv_SE.ISO_8859-1'); If you have physical access to the server You are using, find the "locale" directory on it. On my mac it is at: /usr/share/locale AND check how the "sv_SE.ISO_8859-1) is spelled there!!! On my machine it says "sv_SE.ISO8859-1". (no underscore between ISO and 8859!" Correct the spelling in the swedish.php (if necessary). It only took me two days to find the spelling difference in my own shop-project. (Finnish) :blush: Seagoofy
Recommended Posts
Archived
This topic is now archived and is closed to further replies.