MyBB Community Forums

Full Version: What are those {1} and {2} in the language variables?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
They make me worry to edit breaking PHP codes.
The are placeholders which are replaced by something else (e.g. username, forum name,...).
Exact same placeholder?
Those numbers come into play anytime in a file you see $lang->sprintf( some stuff here). The number in braces refers to the parameter number.
(2015-06-04, 03:14 PM)XP Mai Wrote: [ -> ]Exact same placeholder?

You shouldn't not change/remove them, if that's your question. Only translate words around them.
If you remove those then you're going to find a lot of errors in your forum wording such as missing usernames and other miscellaneous variables. As mentioned above - don't edit them directly.
(2015-06-04, 05:01 PM)Destroy666 Wrote: [ -> ]
(2015-06-04, 03:14 PM)XP Mai Wrote: [ -> ]Exact same placeholder?

You shouldn't not change/remove them, if that's your question. Only translate words around them.
(2015-06-04, 06:02 PM)Marisa Wrote: [ -> ]If you remove those then you're going to find a lot of errors in your forum wording such as missing usernames and other miscellaneous variables. As mentioned above - don't edit them directly.
The issue is that I can't do it.
Try looking at this sentence:
Quote:Thank you for registering on {1}, {2}. < br /> Your registration must be activated by an administrator. Until then, you may not be able to post on these forums.

What can you guess from {1} and {2} that's separated by a comma? I've no idea, sourced everywhere (using Google Search Engine) but can't find.  Sad
(2015-06-04, 06:29 PM)XP Mai Wrote: [ -> ]What can you guess from {1} and {2} that's separated by a comma? I've no idea, sourced everywhere (using Google Search Engine) but can't find.  Sad

{1} is the name of your forum!

{2} is the username of the member who has just registered.

Sleepy
Is there a way to find it myself? I'm planned to edit every word/sentence since the theme of the forum isn't general but for a game. The wordings are too formal and unrelated.
(2015-06-04, 06:50 PM)XP Mai Wrote: [ -> ]Is there a way to find it myself? I'm planned to edit every word/sentence since the theme of the forum isn't general but for a game. The wordings are too formal and unrelated.

Well you could just remove {2} for example and replace it with the name of a location for example if your game is set in 'New York' then remove the {2} and replace it with 'New York'.
Pages: 1 2