Best option for a database used by a translation app I'm about to start working on an app which will include words and their translations in various languages.

What is my best option for a database? 

Queries will be made instantly. So if someone selects "Russian" as a second language and starts typing "Please pass the salt", each of those words will have to be looked up in Russian. And maybe just listing each word won't be the exact translation of the phrase which will lead to another query which will maybe look up the phrase based on the words in the sentence. 

So I can use MySql, or any other non sql database Firebase, Mongo, CouchDb ... etc. But I don't know if not using a relational database is my best option.

Can I do something like this which seems ok but the database will get huge when considering all languages:

{
  "english": {
    "word1": {
      "russian": "word1inrussian",
      "spanish": "word1inspanish",
      "korean": "word1inkorean"
    },
    "a phrase": {
      "russian": "phrase in russian",
      "spanish": "phrase in spanish",
      "korean": "phrase in korean"
    }
  }
}
You don't typically handle translation inside of the database. This is for no specific reason. It certainly could be done, and has been done but that's not the way things are done now.

There are two huge sources of internationalization data,


Unicode Common Locale Data Repository (CLDR)
International Components for Unicode (ICU)


Unicode CLDR is absolutely gigantic. Normally you use something like Globalize.js which wraps these and pulls down data for the features that it supports.

In order to generate most simple strings, a globalization library needs this much crap... (English only shown for simplicity)

&gt; var msg =
  '{GENDER, select, male{He} female{She} other{They} }' +
  ' found ' +
  '{RES, plural, =0{no results} one{1 result} other{# results} }' +
  ' in the ' +
  '{CAT, selectordinal, one{#st} two{#nd} few{#rd} other{#th} }' +
  ' category.';

You'll get these results:

&gt; var mfunc = new MessageFormat('en').compile(msg);

&gt; mfunc({ GENDER: 'male', RES: 1, CAT: 2 })
'He found 1 result in the 2nd category.'

&gt; mfunc({ GENDER: 'female', RES: 1, CAT: 2 })
'She found 1 result in the 2nd category.'

&gt; mfunc({ GENDER: 'male', RES: 2, CAT: 1 })
'He found 2 results in the 1st category.'

&gt; mfunc({ RES: 2, CAT: 2 })
'They found 2 results in the 2nd category.'