No Code Attached Yet ?
avatar mgscreativa
mgscreativa
6 Jul 2022

Hi! Joomla! webservices api language somehow defaults to en-GB despite I have set both, front and back languages in J! admin to default to es-ES. Checking the api/languages folder I can see that both languages are there but they are quite little in lang files, I guess that's because most of the lang constant get loaded from the component itself, like in my case, that a table check produces some lang output that gets loaded from my administrator/com_component/language/en-GB, but it should look for administrator/com_component/language/es-ES as as long as I understand, as this is the default admin language set.

Steps to reproduce the issue

  • Create a simple copmponent with the basic admin files for inserting data from a model/table
  • Create a new webservice plugin and a new api controller and view
  • Set Joomla! default language to something different to en-GB

Expected result

Text output from webservice API calls should get translated to default admin lang (es-ES in my case)

Actual result

All text output from webservice API calls got translated to en-GB

System information (as much as possible)

Apache
MariaDB 10.3.34
PHP 7.4.30
J! 4.1.5

Additional comments

Step debugger showing that all lang files loaded in a webservice API request got to en-GB
screen shot 2022-07-06 at 13 20 14

It seems that the webservices API somehow expects to be multi language
screen shot 2022-07-06 at 13 28 20

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar mgscreativa mgscreativa - open - 6 Jul 2022
avatar mgscreativa mgscreativa - change - 6 Jul 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jul 2022
avatar mgscreativa mgscreativa - change - 6 Jul 2022
The description was changed
avatar mgscreativa mgscreativa - edited - 6 Jul 2022
avatar richard67
richard67 - comment - 6 Jul 2022

If I understand this right, having other languages than en-GB isn't supported yet: https://docs.joomla.org/Joomla_Api_Specification#Language_Negotiation

avatar alikon alikon - change - 6 Jul 2022
Labels Added: ?
avatar alikon alikon - labeled - 6 Jul 2022
avatar mgscreativa
mgscreativa - comment - 7 Jul 2022

Thanks a lot @richard67!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38237.

avatar mgscreativa mgscreativa - change - 7 Jul 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-07-07 12:34:56
Closed_By mgscreativa
avatar mgscreativa mgscreativa - close - 7 Jul 2022

Add a Comment

Login with GitHub to post a comment