Multilingual,SFSErrorCodes.setErrorMessage

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

502522541@qq.com
Posts: 3
Joined: 05 Aug 2022, 04:41

Multilingual,SFSErrorCodes.setErrorMessage

Postby 502522541@qq.com » 05 Aug 2022, 06:15

when use SFSErrorCodes.setErrorMessage,Some information does not contain,like
Username: *** is already in use
Email address: ** is already in use

How to solve it?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multilingual,SFSErrorCodes.setErrorMessage

Postby Lapo » 05 Aug 2022, 09:00

Hi,
the error messages are provided in this format:

Code: Select all

"User %s is already logged in Zone %s"

Where the %s is a placeholder for the user name and zone name respectively, which are generated at runtime.

The above example is in Java, if you're using C# there is a different placeholder but the mechanism is the same. If you want to localize the messages in another language you should translate the text but keep the same amount of placeholders.

For example if we had to translate the above message from English to Italian it would look like this:
"L'utente %s è già loggato nella Zona %s"

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Zenobe
Posts: 1
Joined: 05 Aug 2022, 11:37

Re: Multilingual,SFSErrorCodes.setErrorMessage

Postby Zenobe » 05 Aug 2022, 13:06

Hello @Lapo and thank you for this information. I also got this error message. But I hope with your help I can solve the problem.
My website : chatbot agency
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multilingual,SFSErrorCodes.setErrorMessage

Postby Lapo » 05 Aug 2022, 17:38

Zenobe wrote:Hello @Lapo and thank you for this information. I also got this error message. But I hope with your help I can solve the problem.

You didn't say what error message you're getting.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 48 guests