Osclass Support Forums
General osclass questions => General discussion => Topic started by: Jack on April 22, 2020, 05:39:13 PM
-
Hi,
I tried in every way to print the country string in main page (eg: echo $current_country_code )
does anyone know how it can be done?
I tested:
echo osc_country();
echo $country['pk_c_code'];
$current_country_code = $country['pk_c_code'];
also $codecountry= str_replace('http://', '', osc_country_url());
$codecountry = str_replace('.MYDomain', '', $codecountry); >>>>> no good
-
Country of what?
-
my site is www.domain.com (world)
fr.domain.com (france)
uk.domain.com (united kingdom)
...
I would like to know the "$ string" to be able to easily insert small variations for each country on the theme
thank you
-
@Jack
Ah, I have never tried subdomains, not quite sure if you can get it in that way. Simplest might be to define city/country of subdomain in config.php
-
the subdomains are configured correctly and everything works.
What I can't do is get the string "country name" or "$country['pk_c_code']" on the main.php page..