Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Long Nguyen 1 year, 2 months ago.

Assisted by: Long Nguyen.

Author Posts
April 14, 2024 at 5:06 am #15515346

kevinR-12

In my next multilingual project the client would like the logged in users to be able to save their preferred language for their account. So that whenever they log in they automatically get redirected to their saved language.

Is there an established way to handle this other than using cookies? My idea is to store the language preference in a user meta field using ACF (e.g. radio field "user-language-preference").

I just don't know how to make WPML redirect to whatever is stored in that meta field. If they switch the language setting via an ACF form, the newly saved language should automatically be applied.

April 15, 2024 at 3:58 am #15516963

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Kevin,

Thank you for contacting WPML support, I’m happy to help you with this issue.

I'm afraid that WPML doesn't support an option to redirect a user to a preferred language after logging in.

I suggest you use the filter hook "login_redirect" of WordPress to manually set the redirection based on user meta value.
https://developer.wordpress.org/reference/hooks/login_redirect/

Since we cannot provide custom coding service, if you are not able to accomplish this, I would recommend you contact one of our certified partners who will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/

Thanks.

The topic ‘[Closed] Apply saved language preference in ACF user meta’ is closed to new replies.