translations = function (langKey, translationTable) {

    if (!langKey && !translationTable) {
      return $translationTable;
    }

    if (langKey && !translationTable) {
      if (angular.isString(langKey)) {
        return $translationTable[langKey];
      }
    } else {
      if (!angular.isObject($translationTable[langKey])) {
        $translationTable[langKey] = {};
      }
      angular.extend($translationTable[langKey], flatObject(translationTable));
    }
    return this;
  }
@ngdoc function
@name pascalprecht.translate.$translateProvider#translations
@methodOf pascalprecht.translate.$translateProvider

@description
Registers a new translation table for specific language key.

To register a translation table for specific language, pass a defined language
key as first parameter.

<pre>
 // register translation table for language: 'de_DE'
 $translateProvider.translations('de_DE', {
   'GREETING': 'Hallo Welt!'
 });

 // register another one
 $translateProvider.translations('en_US', {
   'GREETING': 'Hello world!'
 });
</pre>

When registering multiple translation tables for for the same language key,
the actual translation table gets extended. This allows you to define module
specific translation which only get added, once a specific module is loaded in
your app.

Invoking this method with no arguments returns the translation table which was
registered with no language key. Invoking it with a language key returns the
related translation table.

@param {string} key A language key.
@param {object} translationTable A plain old JavaScript object that represents a translation table.