[DONE]Can i detect the used langue?

Place to get help with not working mods / modding interface.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[DONE]Can i detect the used langue?

Post by LuziferSenpai »

Hey Guys,

at the moment i'm working on improving my Straight Pipes MOD.

Now, i'm at that point where i need to set the localised names.
But because english and german direction names are different i need to detect the used localized.
(For other langues i need to add the support later)

Greetz,

Luzifer
Last edited by LuziferSenpai on Sat Aug 27, 2016 11:16 am, edited 1 time in total.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Can i detect the used langue?

Post by aubergine18 »

You just add the different .cfg files in the locale/<lang>/ folder.

For example:

yourMod/locale/en/en.cfg
yourMod/locale/de/de.cfg

Then set your recipe/item/entity names to be locale strings in the prototypes and any of your scripts.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Can i detect the used langue?

Post by LuziferSenpai »

aubergine18 wrote:You just add the different .cfg files in the locale/<lang>/ folder.

For example:

yourMod/locale/en/en.cfg
yourMod/locale/de/de.cfg

Then set your recipe/item/entity names to be locale strings in the prototypes and any of your scripts.
I know, but i need to say in german that its Norden Osten Süden Westen, not North East South West ^^
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [DONE]Can i detect the used langue?

Post by daniel34 »

With your mod (Straight Pipes 0.2.4) the only strings not localised that I saw were the entity icons with text, do you mean them (replacing the E with O in german localisation)?
straight-pipes.jpg
straight-pipes.jpg (10.74 KiB) Viewed 1355 times
If so then I don't know, but I doubt this is easily possible as I've ever seen a mod that does that.
quick links: log file | graphical issues | wiki
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: [DONE]Can i detect the used langue?

Post by LuziferSenpai »

daniel34 wrote:With your mod (Straight Pipes 0.2.4) the only strings not localised that I saw were the entity icons with text, do you mean them (replacing the E with O in german localisation)?
straight-pipes.jpg
If so then I don't know, but I doubt this is easily possible as I've ever seen a mod that does that.
I have done it already^^

Version 1.0.0 is out with it ^^

But the Icons i cant fix at the moment because i dont know why ^^
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Post Reply

Return to “Modding help”