Home › Forum › Plugin e temi di WP › quale funzione usa qtranslate per separare i contenuti in lingua?
-
AutorePost
-
-
16 Settembre 2011 alle 15:48 #19171webbondoPartecipante
Ciao,
ho installato qtranslate sul mio blog, tutto funziona bene tranne per un plugin (uno slider content) che stampa i contenuti in duplice lingua (in pratica non interviene la funzione di qtranslate che estrae i contenuti basandosi sul carattere di split che inserisce a db).
Volevo sapere, mettendo mano al codice, quale funzione usa qtranslate per estrarre il contenuto esatto in lingua.
Nella peggiore dell’ipotesi come posso estrarre il contenuto in lingua? io pensavo di usare una espressione regolare per estrarre tutti i testi contenuti tra <!–:it–> e <!–:–> e poi in base alla lingua in cui mi trovo seleziono l’indice dell’array corretto.
grazie
-
17 Settembre 2011 alle 10:49 #88252reallocPartecipante
Penso che qTranslate usa i filtri delle funzioni the_content, the_excerpt ecc. Magari lo slider è il vero problema perché prende i contenuti in un modo suo?
-
18 Settembre 2011 alle 8:14 #88262zhenyaPartecipante
qTranslate non usa proprie tabelle del database, semplicemente opera con appositi tags html per per identificare le varie lingue.. Molto dipende dai plugins che si usano e se questi sono idonei al multilingua.
Se cerchi nel forum c’era un argomento dove avevo descritto la cosa ed il codice da utilizzare per filtrare le lingue per quelle funzioni ove i quicktags
[:it]Italiano[:en]Inglese
oppure l’uso di
<!–:it–>testo italiano<!–:–><!–:en–>testo inglese<!–:–>
non dovessero funzionare.
-
10 Novembre 2012 alle 16:19 #98586InChaosPartecipante
Vi prego di portare pazienza perchè di WP me ne intendo veramente poco! Sfortunatamente, la persona a cui la mia società si affidava per sviluppare il sito aziendale(che per comodità chiamerò Sig.X) non si è più resa disponibile e la patata bollente è toccata a me! Pertanto, chiedo a qualche utente esperto e paziente di potermi aiutare perchè non so dove sbattere la testa!
Premessa: La mia società aveva bisogno di un sito vetrina dove mostrare circa 500 prodotti, e che per di più fosse bilingue (ITALIANO-INGLESE). Per questi motivi, il Sig.X aveva scelto di usare WP per la creazione del sito. In particolare, ha installato i plugin WP E-commerce e Qtranslate.
Con WP E-commerce, ha creato la classica sezione dedicata ai “PRODOTTI”. Per organizzare i contenuti ha giustamente deciso di dividere il materiale in 4 “macrocategorie prodotto” (esempio: magliette, golf, pantaloni, gonne).
Grazie alla funzione di Qtranslate, il titolo di ciascuna categoria prodotto compariva in ITALIANO quando si andava a visualizzare le pagine in italiano, (quindi:magliette, golf, pantaloni, gonne), in INGLESE, quando si visualizzavano le pagine in lingua inglese (quindi: t-shirt, sweaters, trausers, skirts).
Fatto ciò, queste 4 macrocategorie sono state inserite con 4 titoli in un Widget posto nel sidebar 1. Per rendere l’idea, immaginatevi un box azzurro, la visualizzazione del widget veniva “splittata” cosà¬:
Pagina in italiano Pagina in inglese
“CATEGORIE PRODOTTO” PRODUCT CATEGORIES
-magliette -t-shirts
-golf -sweaters
-pantaloni -trausers
-gonne -skirts
Detto ciò, il problema: oggi, oltre a fare l’aggiornamento di Qtranslate, ho dovuto creare una 5^ categoria prodotto (scarpe). Nella sezione di creazione della categoria, ho inserito entrambi i titoli sia in ita che in inglese, cosà¬:
[:it]SCARPE[:en]SHOES
ho salvato le modifiche. Poi sono andata nella sezione di gestione dei Widget per allegare la nuova categoria, cosଠda farla comparire insieme alle altre. Ho salvato le modifiche al widget, e sono andata a visualizzare la mia paginetta in inglese.
Ebbene, mentre i primi quattro titoli continuavano a comparire in inglese, il titolo della nuova categoria compariva in italiano. Cosà¬:
PRODUCT CATEGORIES
-t-shirts
-sweaters
-trausers
-skirts
-scarpe
Vi assicuro che, nella sezione dei plug in, Qtranlate è attivo!
Vi assicuro che, mentre creavo il titolo della categoria, ho inserito il codice da utilizzare per filtrare le lingue, ovvero [:it]….[:en]….
Sicuramente ho sbagliato qualcosa, ma dove????
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.