Problem/Motivation

the module get the locale from the system (PT-BR) and try to get "https://cdn.datatables.net/plug-ins/1.10.20/i18n/Portuguese,%20Brazil.json" URL but the only URL that exist at DataTables is "https://cdn.datatables.net/plug-ins/1.10.20/i18n/Portuguese,%20Brasil.json", where "Brasil" is writed in the right way (for brazilians) but it is not found by the system.

Steps to reproduce

Ocorreu um erro inesperado no site. Por favor tente novamente mais tarde.

GuzzleHttp\Exception\ClientException: Client error: `GET https://cdn.datatables.net/plug-ins/1.10.20/i18n/Portuguese,%20Brazil.json` resulted in a `404 Not Found` response: 404 Not Found
Not Found (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 of vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

Proposed resolution

we suggest DataTables support to make both URLs available on the server to avoid further errors, bur they refuse then.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 patch_yasm_language.patch750 byteschicodasilva

Comments

clecio.dias created an issue. See original summary.

chicodasilva’s picture

StatusFileSize
new750 bytes

Hi,

I had the same problem. Forced the language to be "English" in this patch.

However if you want a specific language:
https://cdn.datatables.net/plug-ins/1.10.20/i18n/

Hope this can help.

oriol_e9g’s picture

Probably I have to add a map with drupal langcodes and datatables languages, because datatables not use consistent langcodes and language names.

  • oriol_e9g committed 19453a6 on 2.0.x
    Issue #3269759 by chicodasilva, clecio.dias, oriol_e9g: YASM don`t...
oriol_e9g’s picture

I have added a map between drupal langcodes and last datatables available languages:
https://cdn.datatables.net/plug-ins/1.12.1/i18n/

It should now work in dev branch

oriol_e9g’s picture

Title: YASM don`t locate DataTables » YASM don't locate DataTables
Version: 2.0.3 » 2.0.x-dev
Assigned: clecio.dias » oriol_e9g
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.