private function translate_application($application, $directory) {
		$log = '';
		$log .= 'translating ' . $application . ' (' . $directory . ')' . "\n";

		// Fetch the templates in this directory
		$templates = $this->get_templates($directory);
		$strings = [];
		// Parse all the files we found
		foreach ($templates as $template) {
			$log .= $template . "\n";
			$strings = array_merge($strings, $this->get_strings($template, $directory));
		}

		// Translate the strings
		$language_interface = \Skeleton\I18n\Config::$language_interface;
		if (!class_exists($language_interface)) {
			throw new \Exception('The language interface does not exists: ' . $language_interface);
		}
		$languages = $language_interface::get_all();

		foreach ($languages as $language) {
			// Don't create a .po file if it is our base_language
			if ($language->name_short == \Skeleton\I18n\Config::$base_language) {
				continue;
			}

			$log .=  ' ' . $language->name_short;

			// If we already have a (partially) translated file, merge
			if (file_exists(\Skeleton\I18n\Config::$po_directory . '/' . $language->name_short . '/' . $application . '.po')) {
				$translated = \Skeleton\I18n\Util::load(\Skeleton\I18n\Config::$po_directory . '/' . $language->name_short . '/' . $application . '.po');
				$old_translated = \Skeleton\I18n\Util::load(\Skeleton\I18n\Config::$po_directory . '/' . $language->name_short . '.po');
				$translated = array_merge($translated, $old_translated);
			} else {
				$translated = [];
			}

			// Create a new array with the merged translations
			$new_po = [];
			foreach ($strings as $string) {
				if (isset($translated[$string]) and $translated[$string] != '') {
					$new_po[$string] = $translated[$string];
				} else {
					$new_po[$string] = '';
				}
			}

			$result1 = array_diff_key($new_po, $translated);
			$result2 = array_diff_key($translated, $new_po);
			if (count($result1) == 0 and count($result2) == 0) {
				// No new po file will be created, there are no changes
				continue;
			}

			// Stop doing what we are doing if there are no strings anyway
			if (count($new_po) == 0) {
				//continue;
			}

			// And save!
			\Skeleton\I18n\Util::save(\Skeleton\I18n\Config::$po_directory . '/' . $language->name_short . '/' . $application . '.po', $application, $language, $new_po);
		}

		$log .= "\n";
		return $log;
	}