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.

Our next available supporter will start replying to tickets in about 3.14 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Radu 11 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
June 25, 2019 at 9:04 am #4082489



I have been searching for an answer to this, but haven't found a solution yet. Maybe you can help me:
Is there any possibility to tell the WPML plugin to use a language file, which is located in a different folder?

So instead of using this language-file: wp-content/languages/
I want to load this language-file: wp-content/languages/pseudo-lang/

I don't want this to be some global setting, which is always active. This should only happen, if a specific url-parameter is set.

There is this hook: "wpml_switch_language" but here you can only assign a different 2-letter language code, instead of a different folder. And in my case the language code won't change anyway - just the location of the translation file.

Is there any way to do this?

Thanks in advance for your help!

June 25, 2019 at 10:32 am #4083261


Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Nils,

Thank you for reaching out the WPML support!

The /wp-content/languages/ folder is the default one from WordPress (so this is the one used by WPML too). Having this folder structure changed would require some custom coding to change the way that WordPress works but I'm afraid that this is outside of our support scope. I looked over the internet for forum topics or articles that might help you with this but I couldn't find anything related to this. If you want, you can look for a developer that might be able to help you with that right here: