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?

Izdelava spletne trgovine | Najem spletne trgovine | PHP programiranje


User avatar
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?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, 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. You can write PM with additional questions... 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

User avatar
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.

Izdelava spletne trgovine | Najem spletne trgovine | PHP programiranje


User avatar
New member

Posts

Joined
Wed Aug 27, 2014 7:23 pm


Post by dovvas » Wed Jul 10, 2019 5:49 pm

Since you have achieved what you wanted, could you share the code here?

Newbie

Posts

Joined
Wed Jul 10, 2019 5:46 pm
Who is online

Users browsing this forum: No registered users and 195 guests