Jump to content

How to keep to language url if I have only one language?


wis007

Recommended Posts

Hello!

 

I'm working with prestashop 1.5.6.1, and I have a problem with the urls when I have only one language.

For start the shop will be only in one language, but after a few months I'll add another language.

 

I think it's wise that I set that even if i have only 1 language all the urls should contain the language code.

In this way when I add the new language i won't broke all the existing links.

 

I don't wan't to add allready the new language.

 

How can I achieve to show (even if I have one language) the language code in the url?

 

Thanks,

Lehel

Link to comment
Share on other sites

I haven't tested it but my guess is that it is in the file classes\language.php.

 

There at the bottom you will find this:

public static function isMultiLanguageActivated($id_shop = null)
{
	return (Language::countActiveLanguages($id_shop) > 1);
}

Try replacing "> 1" with "> 0".

Link to comment
Share on other sites

I haven't tested it but my guess is that it is in the file classes\language.php.

 

There at the bottom you will find this:

public static function isMultiLanguageActivated($id_shop = null)
{
	return (Language::countActiveLanguages($id_shop) > 1);
}

Try replacing "> 1" with "> 0".

 

Hello! Thanks for your answer. That was the solution I was searching for.

 

Thank you, I will mark this topic as Solved. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...