Replies: 2 comments
-
|
Hi, better later then never. You could also use a method on an autoload: Along a method in the This gives a lot more control in cases where the logic needed is more complicated then a simple if, for example a pluralize method that takes into account special cases like sheep, teeth, etc. In this case all it does is make it a little more fool-proof and shorter to write. Lastly you could put a method like the above into a text modifier, which could be useful if you type it very often. Modifiers are free to create whatever syntax they like, but require more effort to implement that syntax. |
Beta Was this translation helpful? Give feedback.
-
|
Solution provided, gonna convert this to a discussion to preserve the information, as it belongs there more than as an issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I'm trying to use the possessive version of a character's name in a text box and not sure how to achieve that best.
Describe the solution you'd like
Let's say our character_name variable can be two values, John and Chris. I want to use the variable in the following sentance: "This is {character_name}'s car." If I use John as the character name, everything will be fine, but for Chris it should be "This is Chris' car.", without the s after the apostrophe. Ideally, I would be able to write something along the lines of "This is {character_name:possessive} car." and it will fill it properly for both names.
Beta Was this translation helpful? Give feedback.
All reactions