erikvanberkum Posted March 28, 2022 Share 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/ Link to comment Share on other sites More sharing options...
BillH Posted March 28, 2022 Share 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. Link to comment Share on other sites More sharing options...
Zeka Posted March 29, 2022 Share 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 Link to comment Share on other sites More sharing options...
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