Post by faca5 » Tue Nov 21, 2017 4:36 pm

Hello.

How I can switch default language using PHP command in exp. "index.php"?

I found these files related with language.
\system\library\language.php
\system\config\default.php

I like to create language switcher related with IP address.

Example:
If someone visit from UK they get english, if someone visit from Germany they get auto selected germany language etc.

Any idea?

New member

Posts

Joined
Wed Aug 27, 2014 7:23 pm

Post by paulfeakins » Tue Nov 21, 2017 6:43 pm

Are there not any extensions to do this?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Active Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by kestas » Tue Nov 21, 2017 8:21 pm

faca5 wrote:
Tue Nov 21, 2017 4:36 pm
Hello.

How I can switch default language using PHP command in exp. "index.php"?

I found these files related with language.
\system\library\language.php
\system\config\default.php

I like to create language switcher related with IP address.

Example:
If someone visit from UK they get english, if someone visit from Germany they get auto selected germany language etc.

Any idea?
Hi,
I think you should make language autoswitcher in this file catalog/controller/common/language.php
Or find some extension.

I have not tried yet. :)

Good Luck

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by sachin6609 » Tue Nov 21, 2017 8:25 pm

faca5 wrote:
Tue Nov 21, 2017 4:36 pm
Hello.

How I can switch default language using PHP command in exp. "index.php"?

I found these files related with language.
\system\library\language.php
\system\config\default.php

I like to create language switcher related with IP address.

Example:
If someone visit from UK they get english, if someone visit from Germany they get auto selected germany language etc.

Any idea?

Hii

https://www.opencart.com/index.php?rout ... g=3&page=7

https://www.opencart.com/index.php?rout ... load_id=49

Thx

sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by faca5 » Wed Nov 22, 2017 4:07 pm

Thank you all!

New member

Posts

Joined
Wed Aug 27, 2014 7:23 pm

Post by faca5 » Wed Nov 22, 2017 9:20 pm

I have added PHP code into "catalog/controller/startup/startup.php". Now it works.

New member

Posts

Joined
Wed Aug 27, 2014 7:23 pm
Who is online

Users browsing this forum: No registered users and 70 guests