I am not sure if it helps you perfectly but the best approach I am using in this case is to create .po and .mo file for each language, upload it to a website and register it in functions.php or in plugin with this function (you must set path where .po and .mo files will be stored - bellow it's plugin path but you can change it to whatever you want and also you can change "my-theme" tag to your own):
// Adding language files
function theme_setup_hook () {
load_theme_textdomain('my-theme', plugin_dir_path(__FILE__).'/languages');
}
add_action( 'after_setup_theme', 'theme_setup_hook' );
In .po file using Poedit (lightweight open source app which can be downloaded here https://poedit.net/) you just set the language of the file in Properties and select the folder on your disc where files with code with strings to translate are written. Also you must set Keywords in properties where I put these: __ and _e.
In the template's code you then write all strings which needs to be translated like this:
for simple echo:
<?php _e('string to translate','my-theme'); ?>
for using in scripts:
<?php
$string = __('string to translate','my-theme');
echo $string;
?>
After that just Update the po file in Poedit and since you have set proper path all strings are updated here and you can all translate them. Then save the file. Poedit automatically create also .mo file so upload both of files (po and mo) back to server and that's it.
For each language you can do that with separate file which is named like en_GB.po etc.
I hope it helps.