Welcome,
Guest
. Please
login
or
register
.
April 23, 2026, 06:02:33 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[solved] Localization text with callbacks?
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solved] Localization text with callbacks? (Read 3871 times)
jeldrez
Sr. Member
Thank You
-Given: 8
-Receive: 4
Posts: 352
[solved] Localization text with callbacks?
«
on:
April 08, 2013, 06:22:45 PM »
There's any way to introduce callback in localized strings?
For example:
Hi <user>, it's been a while since we met.
And <user> is defined in other screen with and input widget.
is this possible?
Thanks!
«
Last Edit: April 10, 2013, 10:34:29 AM by jeldrez
»
Logged
Nicki
Global Moderator
Hero Member
Thank You
-Given: 33
-Receive: 141
Posts: 1,768
Re: Text with callbacks?
«
Reply #1 on:
April 09, 2013, 01:58:48 AM »
Consider using string.Format?
string
.
Format
(
"Hello {0}. How are you today?"
, mName
)
;
Logged
jeldrez
Sr. Member
Thank You
-Given: 8
-Receive: 4
Posts: 352
Re: Text with callbacks?
«
Reply #2 on:
April 09, 2013, 01:04:10 PM »
But I've the string in the .txt file for localization.
can I string format the key?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Text with callbacks?
«
Reply #3 on:
April 09, 2013, 09:39:31 PM »
label.text = string.Format(Localization.Localize("Some Key"), 123);
Some Key = There are {0} questions in this forum
Logged
jeldrez
Sr. Member
Thank You
-Given: 8
-Receive: 4
Posts: 352
Re: Text with callbacks?
«
Reply #4 on:
April 10, 2013, 10:33:47 AM »
Thanks a lot Aren!
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[solved] Localization text with callbacks?