Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Language month locale


dimi78

Recommended Posts

Hi, I was having trouble with the title for the new products of the month.

 

I fixed this by editing the file includes/modules/new_products.php

 

  //patch Diederik, locale month language display.
 global $languages_id;
 switch ($languages_id)
 {
 case 4:
 setlocale(LC_TIME, "nl_NL");
 break;
 case 5:
 setlocale(LC_TIME, "fr_FR");
 break;
 }
 //end patch

 

I placed this code in the begining of the file.

 

I'm sure this is not the correct place to patch this. Normally this should come out of the db where the locale settings are set.

So my question is where should I make this change so the language of dates etc... is displayed correctly across my entire site?

Link to comment
Share on other sites

/include/language/xxxxxxxxx.php

 

Bit of a problem with English, what time do you display. Australian, US, UK or do you use invoice country?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

/include/language/xxxxxxxxx.php

 

Bit of a problem with English, what time do you display. Australian, US, UK or do you use invoice country?

 

Time settings are ok, I'm on a us server.

I know you can go and change the includes/languages/language/index.php

 

This is what you will find their.

 

define('TABLE_HEADING_NEW_PRODUCTS', 'New products %s');

 

I did translate the new products part but the month comes out of a php function here represented by %s

In order to get this php function to return the month in the correct language I used the above hack.

 

English is not a problem in my code because well the php function is using that standard.

 

But as I stated before this shouldn't be in the new_products.php file I just did this as a quick fix.

So my question was where should such settings be coded in the osc structure.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...