erikvanberkum Posted March 28, 2022 Posted March 28, 2022 I am calling the following on a multilanguage field. $all_options = $field->type->getOptions($field); I am able to get the default language, but how do I access the other languages? I.e. my default is English and one of the other languages is Dutch. When I call this field, on a dutch page it shows up in default English. Anyone able to point me in the right direction? Links below didnt help me. https://processwire.com/docs/fields/select-options-fieldtype/ https://processwire.com/api/ref/fieldtype-options/get-options/
BillH Posted March 28, 2022 Posted March 28, 2022 Have you read the page https://processwire.com/docs/multi-language-support/multi-language-fields/ and particularly the section "Multi-language field values"? I think it'll tell you what you need, and the example code is really helpful.
Zeka Posted March 29, 2022 Posted March 29, 2022 Hi @erikvanberkum It should return current langauge values without any additions to the code, so make sure that you made translations in field configuration. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now