# Lingue & Traduzioni

per modificare la lingua in un negozio multiview dovreste impostare le varie view alle lingue presenti in Magento.

Ad esempio:

* Store A
  * Italiano (View)
    * Locale Italiano (Italia)
  * Inglese (View)&#x20;
    * Locale English (United States)

![](/files/-LfKlwd5Td--OYwhnzJQ)In questo modo quando gli utenti selezioneranno la versione italiana o inglese il modulo riconoscerà la lingua assegnata alla view.

Ecco un esempio relativo all'impostazione della lingua inglese per la view dedicata alla versione inglese del negozio.

![](/files/-LfKlwd7Hj_62nk7zXia)

## Come tradurre il testo contenuto dentro il modulo?

Il modulo offre una traduzione in Italiano ed in Inglese utilizzando un file csv contenuto dentro la cartella app/locale/it\_IT/Shinesoftware\_NomeModulo.csv (magento 1.9.x) e app/code/Shinesoftware/NOME-MODULO/i18n/en\_US.csv (versione inglese per Magento 2.x).

Per aggiungere una lingua e/o aggiungere delle traduzioni basta creare/modificare i seguenti files:

* app/code/Shinesoftware/NOME-MODULO/i18n/**it\_IT**.csv (magento 2.x)
* app/locale/**it\_IT**/Shinesoftware\_NomeModulo.csv (Magento 1.9.x)

Per creare il file serve un semplice editor di testo come il blocco note di Windows o TextWrangler per Mac. Il file deve essere caricato sul server nella posizione su indicata. Il testo da tradurre deve essere così composto:

> "This text must be translated", "Questo testo deve essere tradotto"

Bisogna fare attenzione alle virgolette ed alla virgola separatrice. Ogni frase deve essere racchiusa fra le virgolette e separata con la virgola. Ogni frase deve essere su inserita in una linea differente.

Al termine dell'operazione bisogna aggiornare la cache di Magento.

Il testo da tradurre si trova sempre dentro i files .phtml a vostra disposizione dentro le seguenti percorsi:

* app/code/Shinesoftware/NOMEMODULO/view/frontend/templates/...
* app/design/frontend/base/default/template/NOMEMODULO/...

Aprire i file con un editor di testo e recuperare il testo da tradurre copiandolo nel file csv che avete precedentemente creato. Ad esempio, in un file \*.phtml di un modulo per Magento 1.9.x potreste trovare:

> \<?php echo Mage::helper('NOMEMODULO')->\_\_("If you are the store owner check the log files in your Magento store and contact the bank helpdesk") ?>

e nella versione Magento 2.x potreste trovare:

> \<?php echo $this->\_\_("If you are the store owner check the log files in your Magento store and contact the bank helpdesk.") ?>

Per tradurre le suddette frasi bisogna recuperare solamente ciò che appare fra le virgolette:

* If you are the store owner check the log files in your Magento store and contact the bank helpdesk

e riportare la frase nel file csv precedentemente creato:

> "If you are the store owner check the log files in your Magento store and contact the bank helpdesk.", "Se sei il proprietario del negozio controlla i file di log nel tuo negozio Magento e contatta il supporto della banca"

Come detto in precedenza, dopo aver caricato il file nella stessa posizione sul server, bisogna aggiornare la cache di magento e la traduzione apparirà.

Qualora non doveste riuscire a tradurre qualcosa, potete richiedere il servizio [Programmatore Magento](https://shinesoftware.it/programmatore-magento.html), ed un nostro tecnico creerà l'integrazione per voi.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.axepta.shinesoftware.it/lingue-and-traduzioni.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
