This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to replace the
wpml_language
field with
lang
in Swagger documentation while using the WP API SwaggerUI plugin to ensure consistency with your REST API structure. You could not find information on modifying this field in the WP API SwaggerUI plugin or WPML documentation.
Solution:
We do not provide a built-in option to rename the
wpml_language
field directly in the REST API. However, you can modify the API response using filters or by extending the WP API SwaggerUI plugin. If you need further help with custom coding, we recommend hiring WPML contractors. You can find them here: https://wpml.org/contractors/
Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.
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.