Wayward

Wayward

Translation
I found a problem for translation.
In the case of English, the names of objects begin with a capital letter. However, in the language file they are in lower case. Where can you change this rule?
Can somebody help me?
< >
Showing 1-4 of 4 comments
ChiriVulpes  [developer] Apr 19, 2021 @ 2:07am 
You can change some of the rules for what words capitalisation happens on for your language by editing the "contextRules" property in your language.json file. Here's what that looks like in english:
https://github.com/WaywardGame/english-language/blob/master/english.json#L3969-L3974

"isWord" determines whether a single character is a "word" character. We use \w, which is a regular expression signifier for "word character", which matches letters a-z, A-Z, numbers 0-9, and the underscore _.

"isWordSeparator" determines whether a single character is a word separator. For english we use a space " ", a dash "-", or a slash "/". When capitalising a title, any word characters after a sentence separator are capitalised.

"isSentenceSeparator" determines whether a character is separating two sentences. When capitalising a sentence, any word characters following that separator are capitalised.

"shouldCapitaliseWord" is for excluding certain words from title capitalisation. For example, in english, "of" doesn't get capitalised when in a title, ie "Backpack of Storage."


I don't expect these four properties to be able to make capitalisation work for all languages, so if they're not enough for your language (or you just need help setting them up,) let me know.
Thank you very much for your quick response. I would like the lowercase address entered in the language file to play in the game.

At present, I write the names of the objects in vain in the lower case letter in the language file, appear in the game with capital letters.

for example

It works now:
language file: "sharp rock" >> in the game: "Sharp Rock"

so i would like to:
language file: "sharp rock" >> in the game: "sharp rock"
language file: "Sharp Rock" >> in the game: "Sharp Rock"


ChiriVulpes  [developer] Apr 19, 2021 @ 4:20am 
The same translations are used in multiple places, though, there's multiple contexts. Names of objects can be a title or part of a sentence, for example. You want it to appear the same way in all locations?

I can add a feature to the language configuration that simply turns off capitalisation changes altogether, if that's what you're looking for.
"I can add a feature to the language configuration that simply turns off capitalisation changes altogether, if that's what you're looking for."

Yes, I want exactly that. :)
So be the text as I specify in the text file.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Apr 19, 2021 @ 1:09am
Posts: 4