Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17071

Internationalization and resources

$
0
0

@Fran wrote:

Hey!

Is there any builtin way in Cocos2D to deal with i18n?

I mean, I have resources like images that are different for different languages. With other frameworks I usually use a scheme like:

res/
res/en/title_banner.png // title banner in English
res/es/title_banner.png // title banner in Spanish
res/ru/title_banner.png // title banner in Russian

and so on... I usually left English as a default fallback, so if a given resource doesn't exist in the current language, it will try to use the English one.

The algorithm basically figures out the resource path based on its name and current language, so for spanish title_banner I would get "res/es/title_banner.png", had that file doesn't exist, it will try to load the fallback "res/en/title_banner.png" instead.

Hope you get the idea.

So, to sum things up, my question/s is/are:

a) Is there any builtin support in Cocos2d-JS for this?

In case there isn't such thing:

b) Where should I start for developing something like that for Cocos2d-JS on my own?

Thanks a lot in advance,

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17071

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>