Internationalization#
NOTE: Pull requests are always welcome to add or update translations. If you can translate but are not familiar with GitHub, please contact me, and I will add your translation to Scratch3-Tello.
Block names are defined in scratch-vm/src/extensions/scratch3_tello/index.js. The message object defined in this file is used for i18n.
message['internal block code']['language code'] represents the block’s display name in the specified language.
Example#
For example, let’s translate the takeoff block into German. Currently, message['takeoff'] looks like this:
const message = {
takeoff: {
'ja': '離陸する',
'ja-Hira': 'りりくする',
'en': 'takeoff',
},
// ...
};The language code for German is de. Edit the following so that message['takeoff']['de'] becomes abheben.
const message = {
takeoff: {
'ja': '離陸する',
'ja-Hira': 'りりくする',
'en': 'takeoff',
'de': 'abheben',
},
...
};That’s all there is to it.