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 10.97 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bruno Kos 2 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
July 25, 2019 at 11:58 am #4282771

yaronK-4

I'm trying to set the WPML language URLs programmatically, but there seems to be no such options. I use multiple environments and set WP_HOME and WP_SITEURL in my wp-config. I want to do the same for the WPML URLs.

July 25, 2019 at 1:56 pm #4283841

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I believe that you should reach out our contractors to help you with this:
https://wpml.org/contractors/

Because this could be potentially difficult custom task (if possible), outside of WPML support canal. You could have a look at our API:
https://wpml.org/wpml-hook/wpml_home_url/
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Or perhaps check this:
https://wpml.org/forums/topic/how-to-set-default-language-for-a-blog-programmatically/#post-3227328

I wasn't able find any similar case in our archives, and this may also yield rewrite rules based on language code, etc.

Regards,
Bruno Kos

July 30, 2019 at 1:48 pm #4308137

yaronK-4

Hi,

Thank you for your answer.

I do think this should be something out of the box, based on the current URL, like setting the language URLs using subdirectories, but with subdomains.

I don't think I'm the only one using WPML in multiple environments, as this is the standard practice.

July 31, 2019 at 5:39 am #4311573

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I suggest you fill out this form:
https://wpml.org/suggest-a-new-feature-for-wpml/

If there are enough requests for some feature, then it is considered by our development team and the product lead and implemented.

Regards,
Bruno Kos