How translation works ?

twisted1919

Administrator
Staff member

MailWizz version 1.1 introduced multi-language, internationalization and translation support.

You can now create new languages from your backend panel and with the help of the "Translate" extension, let MailWizz EMA collect the messages to be translated from the entire application so that later you can translate everything into your language.
Once a translation is ready, it becomes a language pack that can be zip archived and distributed to be installed in any MailWizz EMA installation from the backend panel in a few clicks.

In case there is no language pack available for your language so that you can easily install it, you'll have to follow these steps to enable translation:

1. Go to languages area (backend) and add your language manually (add language name and language 2 letter code).
2. Go to extensions area(backend) and enable the translate extension.
3. In the extension area, click on the translate extension title so that you are directed to the extension settings page.
4. Activate message collecting.

Once message collecting is activated, all your messages will be stored under the directory /apps/common/messages/lang_code where lang_code is your language code, i.e: de/it/es etc.

While you browse your website, messages from the sections you visit will be written in files and you can translate them on the fly.
Once you are done translating for your language, you can save the language folder locally on your computer as lang_code.zip and distribute it as a language pack so others can use it as well.

Notes:
1. Once you are done creating translations for a certain language, make sure you disable the translate extension, it doesn't make sense to always keep it active.
2. Make sure the messages directory(/apps/common/messages/) is writeable by the web server, otherwise translation files will not be created nor messages will be added in files.
 
I don't think mailwizz creates an "english" folder.
It will create a folder only for other languages, and this folder will have same name as the language code and locale (if it's the case).
In your case, if you add Portuguese in backend as a language and you set pt as the language code and br as the region code, then your folder will be pt_br and that's the place where all the translations will be stored.
And given that pt_br is avialable at https://forum.mailwizz.com/threads/translation-for-pt-br.15/ , why don't you use that as a starting point ?
 
I don't think mailwizz creates an "english" folder.
It will create a folder only for other languages, and this folder will have same name as the language code and locale (if it's the case).
In your case, if you add Portuguese in backend as a language and you set pt as the language code and br as the region code, then your folder will be pt_br and that's the place where all the translations will be stored.
And given that pt_br is avialable at https://forum.mailwizz.com/threads/translation-for-pt-br.15/ , why don't you use that as a starting point ?
Hello,

I'll pay a company that translates from English to Spanish me ... you can not get in any way?
 
For future people need translates new versións a paste my code to get translate in english.

Very progrman how SDL Trados dont show de keys (arrays)

PHP:
<?php
    define('MW_PATH', 1);
   
    $directorio = opendir("fr_fr");
    while ($archivo = readdir($directorio))  {
        if (!is_dir($archivo)) {
            $contenido = include_once('fr_fr/'.$archivo);
           
            $mensaje = "<?php defined('MW_PATH') || exit('No direct script access allowed'); \n\n";
            $mensaje .= "/**
* Translation file for \"{$archivo}\" category.
*
* This translation is automatically generated by the Translate extension.
*
* @package MailWizz EMA
* @author Translate María Fosado (maria@mfosadoti.com)
* @link http://www.mailwizz.com/
* @copyright 2013-2015 MailWizz EMA (http://www.mailwizz.com)
* @license http://www.mailwizz.com/license/
* @since 1.1
*/\n";
$mensaje .= "return array (";

foreach($contenido as $a=>$b) {
            $b = utf8_decode($b);
            $a = utf8_decode($a);
            $mensaje .= "    '{$a}' => '{$a}',\n";
        }
       
        $mensaje .= ");\n";
        $mensaje .= "?>";

        $file = fopen("es_es/".$archivo, "w");
        fwrite($file, $mensaje);
        fclose($file);
        unset($mensaje);

        }
    }

   
   
?>
 
you can translate them on the fly
After following your above instructions, the folders with some files were created at the mentioned locations, but I do not know how to do any translation on the fly, where would that be? Any windows popup or hovering or what am I missing?
 
@frm.mwz - the files are created and filled in with text in english, so then you open those files with your favourite editor and change the english text with your own.
 
@twisted1919
...got one file translated, 100 to go!
...the files are coming into the directory step-by-step,m I wonder how long it takes, and if there is a cli way to get them all done quickly at once?
 
@frm.mwz - the way it works now... uhm, is to add translation in the files as you use the system, that is each page you visit, will create and add new content to the files.
There's no cli command as of now, though i'd like to have one, it's not really a high priority atm.
 
@twisted1919

ok, got it. interesting way, so it creates the language parts when they get displayed/processed by the php pageload frontend?

noticed, that after several times setting 'no' as default language (and saving it that way), it keeps jumping back to 'yes', what should I do differently?
 
ok, got it. interesting way, so it creates the language parts when they get displayed/processed by the php pageload frontend?
Yes, pretty much this is what happens.
noticed, that after several times setting 'no' as default language (and saving it that way), it keeps jumping back to 'yes', what should I do differently?
It does this when you have a single language, it forces it as the default, put a second language and you can toggle between them ;)
 
@twisted1919
Apologies, if I am not getting it, but on default, there is no language loaded;
and if one wants to create a language translation, one will have only one loaded, so then it has to switch to that one?
Perhaps that is why someone asked for en_en?
 
Last edited:
Back
Top