Multiple XML support using AJAX?

Discussion and feedback on Construct 2

Post » Fri May 29, 2015 4:21 pm

Hi

I have a quick question:
Right now I'm using XML files for different languages (strings.en.xml, strings.es.xml, etc...) and I switch between them

But I would like to use other XML file for levels data (o lot bigger than the languages .xml) so, I don't want to include those data inside every language file

Is possible have loaded more than one XML files using AJAX?

Thanks
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Fri May 29, 2015 5:16 pm

This a graphic example:
Image

I know I could merge the levels data into the language data, but I would need to do it for all the levels type.
If I go that way the languages files would be:

English: 100 lines of sentences + 1000 "levels type 1" lines + 1000 "levels type 2" lines + 1000 "levels type 3" lines + 1000 "levels type 4" lines = 4100 lines
Spanish: 100 lines of sentences + 1000 "levels type 1" lines + 1000 "levels type 2" lines + 1000 "levels type 3" lines + 1000 "levels type 4" lines = 4100 lines
The same with each language file

Any suggestions?
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Sat May 30, 2015 2:40 am

Sorry :/
I have not had a good day.
How can I not notice that you can have multiple XML objects?
Today was not a good day, I need to sleep... zzz...
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Fri May 19, 2017 2:14 am

Have you figured it out? I am in a similar situation.

I have 2 XML files at once to reduce the size.
How do I access them independently?
B
68
S
37
G
13
Posts: 241
Reputation: 12,785

Post » Sun May 21, 2017 3:25 am

@Unconnected
Just add another XML object!
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Tue May 23, 2017 12:31 pm

Simple enough. Thank you.
B
68
S
37
G
13
Posts: 241
Reputation: 12,785


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests