Skip to content

Latest commit

 

History

History
111 lines (91 loc) · 8.03 KB

LocalizedMessages.md

File metadata and controls

111 lines (91 loc) · 8.03 KB

LocalizedMessages

LocalizedMessages contains localized messages to be displayed in a level.

Example

{
  "en": {
    "name": "Picking",
    "objective": "Put one %%icon icon-egg$%% egg which is less than 4\ninto each %%icon icon-cauldron$%% cauldron\n\n%%icon mdi mdi-information-outline$%% If you want to test the value of an %%icon icon-egg$%% egg which is on the floor, you can use a %%icon icon-direction$%% direction. Your heroes are smart enough to understand that you're talking about the %%icon icon-egg$%% egg.",
    "loss_reason_one_egg_ge_4": "You put an %%icon icon-egg$%% egg greater or equal to 4\nin a %%icon icon-cauldron$%% cauldron"
  },
  "fr": {
    "name": "Cueillette",
    "objective": "Mets un %%icon icon-egg$%% œuf inférieur à 4\ndans chaque %%icon icon-cauldron$%% chaudron\n\n%%icon mdi mdi-information-outline$%% Si tu veux tester la valeur d'un %%icon icon-egg$%% œuf qui est sur le sol, tu peux utiliser une %%icon icon-direction$%% direction. Tes héros sont assez intelligents pour comprendre que tu parles de l'%%icon icon-egg$%% œuf.",
    "loss_reason_one_egg_ge_4": "Tu as mis un %%icon icon-egg$%% œuf supérieur ou égal à 4\ndans un %%icon icon-cauldron$%% chaudron"
  }
}

Supported languages

The first level of properties are language code keys. For now, Selfless Heroes is supporting the following languages:

Language code (ISO 639-1) Language Status
de German ✅ supported
en English ✅ supported
es Spanish ✅ supported
fr French ✅ supported
pl Polish ✅ supported
pt Portuguese ✅ supported
ar Arabic ➿ work in progress
eo Esperanto ➿ work in progress
it Italian ➿ work in progress
ru Russian ➿ work in progress

If you would like to see your own language added to this list, contact me on Discord. 😉

Required properties

English (en) being the default language of the game, the en key is required. Other languages are not. That said, it would be much appreciated to have other languages supported too for your level. You can even provide translations in languages that are not supported by Selfless Heroes yet, hoping that it will be supported in the future.

Required properties of a language object:

SelflessHeroesString

objective and loss reason properties use SelflessHeroesString notation. It allows the use of icons and styling in messages.

The general form is %%style$text%% with style and text varying according to your needs.

Icons

Icon Name Notation
information information %%icon mdi mdi-information-outline$%%
warning warning %%icon mdi mdi-alert-octagon-outline$%%
hero hero %%icon icon-hero$%%
bonfire bonfire %%icon icon-bonfire$%%
cauldron cauldron %%icon icon-cauldron$%%
egg egg %%icon icon-egg$%%
spikes spikes %%icon icon-spikes$%%
switch switch %%icon icon-switch$%%
switch-red switch-red %%icon icon-switch-red$%%
floor floor %%icon icon-floor$%%
wall wall %%icon icon-wall$%%
hole hole %%icon icon-hole$%%
infected infected %%icon icon-infected$%%
npc npc %%icon icon-npc$%%
myitem myitem %%icon icon-myitem$%%
number number %%icon icon-number$%%
variable variable %%icon icon-variable$%%
nothing nothing %%icon icon-nothing$%%
direction direction %%icon icon-direction$%%
everyone everyone %%icon icon-everyone$%%
message-coffee message-coffee %%icon icon-message-coffee$%%
message-hey message-hey %%icon icon-message-hey$%%
message-ho message-ho %%icon icon-message-ho$%%
message-kiss message-kiss %%icon icon-message-kiss$%%
message-lol message-lol %%icon icon-message-lol$%%
message-ok message-ok %%icon icon-message-ok$%%
message-stop message-stop %%icon icon-message-stop$%%
message-wait message-wait %%icon icon-message-wait$%%

Styles

Styled text Name Notation
text-style-branching-statement branching-statement %%statement branching-statement$text%%
text-style-action-statement action-statement %%statement action-statement$text%%
text-style-assign-statement assign-statement %%statement assign-statement$text%%
text-style-speach-statement speach-statement %%statement speach-statement$text%%
text-style-level-title level-title %%level-title$text%%