Is it possible to have localized screenshots in the tips and tricks section?
Is it possible to have localized screenshots in the tips and tricks section?
Can you tell me if there is a mechanism for substituting localized screenshots depending on the locale in the tips and hints section?
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: Is it possible to have localized screenshots in the tips and tricks section?
What? I didn't know you could have screenshots in tips and tricks.
They're supposed to be simulations (Bassically a mini factorio game that runs, and so should use whatever local happens to be active).
If all you want is some text to be different for different languages that should be easy with custom locale ksys.
They're supposed to be simulations (Bassically a mini factorio game that runs, and so should use whatever local happens to be active).
If all you want is some text to be different for different languages that should be easy with custom locale ksys.
Re: Is it possible to have localized screenshots in the tips and tricks section?
In addition to the simulation, there are just .png images. Of course, the text is translated without any issues. But the image remains in English. So I'm wondering if it's possible to replace the image depending on the locale.
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: Is it possible to have localized screenshots in the tips and tricks section?
You mean the icon? https://lua-api.factorio.com/latest/pro ... html#iconsdodther wrote: Tue Jan 07, 2025 10:41 am In addition to the simulation, there are just .png images. Of course, the text is translated without any issues. But the image remains in English. So I'm wondering if it's possible to replace the image depending on the locale.
Or are you using a different field?
I'm pretty sure icon's cannot be localised. You can make a modding interface request for that, but I doubt Wube will do it (as it would be a lot of work, and icons probably shouldn't have text on them anyway, as they're very small).
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: Is it possible to have localized screenshots in the tips and tricks section?
You should not be using a screenshot for that.
I assume this GUI exists in factorio already?
You should be creating the GUI at runtime:
Code: Select all
data:extend{{
type = "tips-and-tricks-item",
simulation = {
...
init = [[
player = game.simulation.create_test_player{name = "Some Name"}
local frame = player.gui.screen.add{type = "frame", caption = {"locale.key"}}
.... ]]
Look at the in game tips and tricks for examples of stuff you can do! (E.g., the first one in this file creates a nice little table https://github.com/wube/factorio-data/b ... ations.lua).