Get text content in all language for JSON Rest APIs
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Advanced
- Posts: 114
- Joined: 08 Nov 2019, 11:56
Get text content in all language for JSON Rest APIs
Hello,
We have added english and arabic text into our payment and delivery service. Now, for searching purpose want to get both the text at same time from the REST APIs.
Right now, It is returning English by default and when we pass locale=ar, then it is returning Arabic text content. How can we get both language content as same time?
Thanks in advance
We have added english and arabic text into our payment and delivery service. Now, for searching purpose want to get both the text at same time from the REST APIs.
Right now, It is returning English by default and when we pass locale=ar, then it is returning Arabic text content. How can we get both language content as same time?
Thanks in advance
Re: Get text content in all language for JSON Rest APIs
That's difficult because only the texts for the current language is returned. You would have to change the "jincluded" view helper in the JSON API implementation to return all texts by removing the "isAvailable()" call here:
https://github.com/aimeos/ai-client-jso ... d.php#L144
This may have other unforseen consequences e.g. for prices which are returned but shouldn't be available to the customers.
https://github.com/aimeos/ai-client-jso ... d.php#L144
This may have other unforseen consequences e.g. for prices which are returned but shouldn't be available to the customers.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star