Defold really likes to know about everything up front to be able to optimize resource use. This obviously doesn’t work well with a strategy of loading and using additional files at runtime. It is not impossible though.
Images can be loaded using either image.load() or through one of the extensions that are available in the asset portal.
Sounds can be loaded using the FMOD extension or through the new sound feature we released where you can load sound data into a buffer and set that on a sound component.
Fonts on the other hand doesn’t support this… A couple of solutions I can think of:
- Use the resource.font() functionality to define additional fonts and then set those on your labels based on the user language.
- Add multiple fonts to your gui scenes and use gui.set_font() based on user language.
In both of these cases you need to know beforehand which fonts you are going to need. You can probably figure out quite early on in which markets you wish to launch your games and then make sure to find the required fonts matching the languages in those markets.
You can also use live update to update an installed game with additional content, including fonts.