No puedo tener almacenado las traducciones en mi propio servidor (not found)

No puedo tener almacenado las traducciones en mi propio servidor (not found)

ramherferramherfer Posts: 4Questions: 1Answers: 0

Description of problem: Hola estoy trabajando con xampp y en localhost. Intento no utilizar el CDN de datatables.net y utilizando mi propia traducción en Language: {url: "vistas/lang/datatables/es-ES.lang}
Este cambio me da el siguiente error "404 not found" GET http://localhost/convoca/admin3012/vistas/lang/datatables/es-ES.lang en versiones anteriores funcioaba y tenia mi propio archivo de traducción personalizado. En esta versión es como si no lo pudiese encontrar en la ruta que estoy convencido que se encuentra. Si pongo el CDN de datatables.net funciona perfectamente. Si pongo la traducción directamente var table = $('#tabla').DataTable({}) funciona perfectamente. ¿Que estoy haciendo mal en la url?.
Por favor una ayuda.
Gracias.

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,205Questions: 26Answers: 4,927

    Language: {url: "vistas/lang/datatables/es-ES.lang} This change gives me the following error "404 not found"

    The web server is not able to find the path vistas/lang/datatables/es-ES.lang. You will need to look at your web server configuration to learn where to place the language file and what path to use to get to the file. This is something specific to your configuration.

    Kevin

  • ramherferramherfer Posts: 4Questions: 1Answers: 0

    Gracias Kevin. Estoy usando xampp y no tengo ningun problema con la carga de imagenes y otros archivos en la aplicación. No se si debería revisar algo en particular, pero ya digo que este problema me surge sólo con la url de datatables. Es como si de forma forzosa buscara una ruta en la web.

  • kthorngrenkthorngren Posts: 21,205Questions: 26Answers: 4,927
    Answer ✓

    What I'm saying is it has nothing to do with Datatables. Datatbles does nothing to manipulate or change the URL. You need to provide a URL that your web server has access to. This is specific to your web server's environment and configuration. Try the URL from a web browser, does it work?

    Kevin

  • ramherferramherfer Posts: 4Questions: 1Answers: 0

    Pues acabo de probarlo Kevin y mis disculpas. No se me habia ocurrido probarlo antes pero tampoco funciona desde el navegador. ¡¡UUmmmm!!

  • kthorngrenkthorngren Posts: 21,205Questions: 26Answers: 4,927
    edited October 2022 Answer ✓

    Maybe the URL needs to be /convoca/admin3012/vistas/lang/datatables/es-ES.lang. Or configure a route in the web server to allow for using /vistas/lang/datatables/es-ES.lang.

    Kevin

  • ramherferramherfer Posts: 4Questions: 1Answers: 0

    Termino de dar con el problema. No puede ser tantas horas de trabajo, no es bueno. En el codigo de la aplicación tenia definido el nombre del archivo de idioma como es_ES.lang y almacenado en la configuración de la aplicación es-ES.lang. Me he dado cuenta al no encontrar el archivo tampoco en el navegador, sabiendo que xampp estaba bien configurado dado que otros archivos los localiza sin problemas.
    Corrigiendo en el código de la aplicación el problema está resuelto.
    Pido disculpas.
    Gracias Kevin por la ayuda.

Sign In or Register to comment.