My way to learn French

15 October 2020 - 1 minute read

In my free time I am trying to learn french using Duolingo. Duolingo isn't the only source I use for learning. Twitch also is a great source for listening and interacting with french people. I also use Discord sometimes to talk with native french people in either voice chat or a text channel. They help me really well!

My vocabulary is growing with duolingo, but making full sentences is still pretty challenging. So I had the idea of translating my articles in french too, just for learning purposes. That way I would be learning more french while writing about topics I like or projects I did.

Learning french almost looks like programming. I want to say something but I don't know how, so I search for information on the web, french natives or duolingo to make the article. That way I will improve vocabulary and use the language too! Now you might say, just use google translate, but that way I won't learn the language. Google Translate translates sentences too literally sometimes which doesn't help reading the article.

Changes in the backend

To use more languages in my articles I had to rewrite my backend a little bit. Earlier I had only one markdown field to write the content of the article. Now I have 3 markdown fields, each for the 3 languages, dutch, english and french. I store them as a fake field in a json file structure. This way all 3 languages will be put in the markdown field under their own language name.

$this->crud->addField([
    'name' => 'fr',
    'label' => "Content French",
    'type' => 'simplemde',
    'simplemdeAttributes' => [
        'tabSize' => 4
    ],
    'fake'     => true, 
    'store_in' => 'markdown'
]);

The default language will be English. I have chosen for that since I'm still learning french so translation won't be perfect and people search in English on Google for most of the time. My solution is to have an option to choose which language to show the article in. You will be probably see that at the top of the article, try it out!