Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

All of the known issues are documented in https://wpml.org/known-issues/ you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described here https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Anonymous 6 years, 9 months ago.

Author Posts
June 27, 2012 at 2:32 pm #65093


I have a site with 2 subdomain :
- hidden link -> english version
- fr.mysite.com -> french version

But, the get_template_directory_uri() function give always "www.mysite.com/wp-content..." in both case. Is this a method in WPML to have "fr.mysite.com/wp-content..." in the translated version ?


June 28, 2012 at 1:50 am #65167


Dear Jean,
Since all files of the website i.e css, javascript and all are stored in the original language directory path i.e "www.mysite.com/wp-content…" , its only logical that even the secondary language site is using the same directory path for its files.
But if you want otherwise,
then you can set absolute paths together with "php if" conditional statements like this

<?php if(ICL_LANGUAGE_CODE=='language-code-1'): ?>

...absolute path to your files here.....

<?php elseif(ICL_LANGUAGE_CODE=='language-code-2'): ?>

....another absolute path to your files here...

<?php endif;?>

You can find your language codes in WPML->Languages->Edit Languages
then replace language-code-2 and language-code-1 with the respective codes.

The topic ‘[Closed] get_template_directory_uri() per language (subdomain))’ is closed to new replies.