Home › Forum › Problemi Vari con WP › Traduzione di hard coded text
-
AutorePost
-
-
15 Settembre 2015 alle 2:51 #30080oltrecomicsPartecipante
Salve a tutti,
vorrei tradurre in varie lingue l’hard coded text presente nel file functions.php
Premetto che so poco e nulla di linguaggi di programmazione, però il copia e incolla lo conosco bene per chi volesse aiutarmi
L’unica cosa che ho capito è quella di modificare la seguente riga di codice:
<div class="box-tipo"><div class="box-campo">Disegni: </div><div class="box-risultato"><ul class="box-voci">
in questa:
<div class="box-tipo"><div class="box-campo"><?php _e( 'Disegni','customizr-child'); ?>:</div><div class="box-risultato"><ul class="box-voci">
Poi ho aggiunto al file .po questa riga:
#: customizr-child/functions.php:769
msgid "Disegni"
msgstr "Drawings"Non so se la path sia giusta, dato che “functions.php” si trova nella cartella Child e il file “.po” nella cartella del Tema Principale (o tema madre).
Avendo constatato che questo procedimento non funziona, vorrei sapere cosa dovrei aggiungere, modificare o eliminare per ottenere un risultato.
Grazie in anticipo
-
15 Settembre 2015 alle 13:00 #118732
-
16 Settembre 2015 alle 18:46 #118770oltrecomicsPartecipante
Grazie Titti del tuo consiglio ma (oltre a capire poco l’inglese), come ho detto nel post precedente, sono ignorante in materia di programmazione.
quello che mi servirebbe, se possibile (e per grazia divina)è un esempio pratico che io possa copiare e incollare.
Da quello che ho capito su aruba la path assoluta è
/web/htdocs/wwwnomedominio.ext/home/
Quindi desumo che nel file .po in inglese dovrei mettere la path cosà¬:
#: /web/htdocs/wwwnomedominio.ext/home/wp-content/themes/customizr-child/functions.php:769
msgid "Disegni"
msgstr "Drawings"Ho provato ma non funziona… che manca? Dove sbaglio?
-
17 Settembre 2015 alle 8:46 #118771TittiModeratore
Non ci vuole il path assoluto
#: ../functions.php:769 (riga giusta) o
#: functions.php:769
ma se non funziona è difficile dire perché dato che non si sa come hai fatto tutto il resto: devi studiare come creare il file .po per un child theme.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.