Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for user's preferred locale option #1289

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Apr 19, 2023

Description

Added support for saving user’s preferred locale.

Related issues

#612

@i-just i-just requested a review from angrybrad as a code owner April 19, 2023 09:09
src/services/Process.php Outdated Show resolved Hide resolved
Copy link
Member

@angrybrad angrybrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably missing something, but where does parsePreferredLocale() actually get called from? I don’t see it in any base classes and nothing in Feed Me’s User element calls it.

@i-just
Copy link
Contributor Author

i-just commented Apr 28, 2023

services/Process->processFeed() calls base\Element->parseAttribute() which calls a method called 'parse' . ucwords($fieldHandle). That’s how most attributes are dealt with.

https://github.com/craftcms/feed-me/blob/main/src/services/Process.php#L364
https://github.com/craftcms/feed-me/blob/main/src/base/Element.php#L100-L107

Screenshot 2023-04-28 at 08 02 47

@angrybrad
Copy link
Member

@i-just thank you!

@angrybrad angrybrad merged commit 87e94ca into v4 Apr 28, 2023
@angrybrad angrybrad deleted the bugfix/612-user-preferred-locale-support branch April 28, 2023 17:58
angrybrad added a commit that referenced this pull request Apr 28, 2023
@gschratzer
Copy link

just i was confused about the fieldname PreferredLocale, that is the functionname but in my csv it is working fine in my moodle [4.1.6 (Build: 20231009)] perfect if i have a field lang with the isocode
en, fr, ro, ru, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants