Salta la navigazione

Questo thread è stato risolto. Ecco una descrizione del problema e della soluzione.

Problem:
If you're unable to use the WPML editor to translate custom PHP files like home.php on your site, it's likely because the file isn't set up for localization.
Solution:
We recommend modifying the code to include GetText calls. Once you've made these changes, WPML will be able to read and translate the file.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.

Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.

La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.

Etichettato: 

Questo ticket contiene 8 risposte, ha 2 voci.

Ultimo aggiornamento da Laura 8 mese, 2 settimana fa.

Assistito da: Laura.

Autore Messaggi
Luglio 18, 2024 a 4:04 pm #15973669

marcoA-45

Contesto del problema:
The homepages and other first-level pages of my site link nascosto are custom with a PHP file called home.php. I want to translate them but I can't use the editor of WPML.

Sintomi:
I can't use the editor of WPML to translate custom PHP files.

Domande:
How can I translate custom PHP files like home.php using WPML?

Luglio 18, 2024 a 4:06 pm #15973698

marcoA-45

here a screen of the home.php

Screenshot 2024-07-18 180600.png
Luglio 18, 2024 a 6:38 pm #15974232

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+02:00)

Salve,

grazie per averci contattato.

Da quello che vedo, il file non è predisposto per la localizzazione quindi è impossibile tradurlo per WPML.

Il codice va modificato includendo le chiamate GetText, dopodiché WPML sarà in grado di leggerlo e tradurlo.

Luglio 19, 2024 a 7:29 am #15976319

marcoA-45

Salve, cosa intende "predisposto per la localizzazione"?
Per ogni stringa di testo devo inseirire la chiamata?

Luglio 19, 2024 a 8:01 am #15976529

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+02:00)

Con non è predisposto per la localizzazione intendo che non ci sono le chiamate, che vanno aggiunte per ogni segmento di testo.

Luglio 19, 2024 a 3:53 pm #15979279

marcoA-45

capito e una volta predisposte le chiamate, devo andare su wpml-> traduzione stringhe per trovare le stringhe da tradurre? grazie

Luglio 19, 2024 a 4:05 pm #15979297

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+02:00)

Sì, potrebbe essere necessario scansionare le stringhe del tema.

Luglio 25, 2024 a 11:17 am #16003221

marcoA-45

ho inserito la chiamata (screen1).
su > traduzione stringhe non trova questa stringa "Prospettive di sviluppo nella ricerca e nella didattica delle lingue e letterature straniere"

Su loco translate trovo la stringa ma non riesce a tradurla (screen2)
Potete aiutarmi per favore?

2.png
1.png
Luglio 25, 2024 a 4:25 pm #16004738

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+02:00)

Prova tutto quello che è suggerito qui.