Ability to set language for cpanel API errors
Open Discussion
Currently the error messages from a Cpanel API call return in the language set by the customer. As a hosting provider, we don't want the API errors to be displayed in whatever language the customer set in their cpanel. We need them in English.
Please update your system so that API calls are not dependent on the cpanel language, but rather on our setting.
For example, we might get an error such as this:
Cpanel API returned
error: ubercompinformatica-com-br.dumaugames.com.br é propriedade de outro
usuário.
or
Cpanel API returned error: ???????????
I guess that means we have to temporarily change the customer's language to understand it or use translate.google.com?
At the API level, how do you propose making a distinction between errors that should be displayed to the user, and hence localized, and errors that should not be localized?
Many parts of our UI use our various API functions. Users tend to like seeing messages in their chosen language. If API error messages were in a language the user could not control, then the user could miss vital information.
At the API level, how do you propose making a distinction between errors that should be displayed to the user, and hence localized, and errors that should not be localized?
Many parts of our UI use our various API functions. Users tend to like seeing messages in their chosen language. If API error messages were in a language the user could not control, then the user could miss vital information.
One option is to allow admins to enable a dual language display --the error in each language (one the admin chooses, one the user chooses--if the languages are different).
Another option is to distinguish the errors that are not seen by the user, and only seen at the admin level?
One option is to allow admins to enable a dual language display --the error in each language (one the admin chooses, one the user chooses--if the languages are different).
Another option is to distinguish the errors that are not seen by the user, and only seen at the admin level?
From my co-worker:
"I would think that, when the language to report errors in needs changed, it would be added as an API2 parameter that all API calls could have, say, 'api_locale=en'. This would be the second option described."
From my co-worker:
"I would think that, when the language to report errors in needs changed, it would be added as an API2 parameter that all API calls could have, say, 'api_locale=en'. This would be the second option described."
That is really what we are looking for: errors that are not for the user but are useful for debugging at the dev/admin level. We need this in our language to be useful.
That is really what we are looking for: errors that are not for the user but are useful for debugging at the dev/admin level. We need this in our language to be useful.
Hi,
There should be a way to translate the errors. Using the cPanel API on our website don't look professionnal for this reason if we compare with other solutions.
Hi,
There should be a way to translate the errors. Using the cPanel API on our website don't look professionnal for this reason if we compare with other solutions.
api_locale=en parameters should be there. just add the parameter and let people translate the errors, so the same errors will be sent to the user, no matter if they are in cPanel or if they are using an external interface using the api!
api_locale=en parameters should be there. just add the parameter and let people translate the errors, so the same errors will be sent to the user, no matter if they are in cPanel or if they are using an external interface using the api!
Replies have been locked on this page!