Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

RenJS

HTML5 Visual Novel creation made easy and free · By lunafromthemoon

About RenJS Multilanguage: can the parameter LANG be aplied to the ASSETS folder ?

A topic by Lapinay created Apr 07, 2019 Views: 372 Replies: 12
Viewing posts 1 to 6
(1 edit)

Hi. I've some images in the assets folder that have text on it. I'd like to have by example some  ES and EN folders and i was wondering if this works , in setup file :

backgrounds:
  beach: assets/LANG/backgrounds/beach.jpg
Developer(+1)

Hello Alix, that should certainly work. When working on a multilanguage game, any path with LANG on it, be it in the GUI, config file or setup file will be converted to the right language.

Glad to hear that !

Hi! I've encountered an issue. I have declared  3  langages EN, ES, and FR but whenever user clicks on one of the other buttons, then, only the EN story is loaded.  I only changed the size of the game screen.

My config file looks like this,  and i have a repository for each langage name EN, ES, FR with a specific story for each:

var globalConfig = {
  w:1000,
  h:659,
  mode: "AUTO",
  scaleMode: "NO_SCALE", //SHOW_ALL, EXACT_FIT, NO_SCALE    i18n: {
    langs: ["en","es","fr"],
    path: "assets/gui/i18n/",
    format: ".png",
    w: 163,
    h: 83
  },
  splash: { //The "Loading" page for your game
    loadingScreen: "assets/gui/LANG/splash.png", //splash background
    loadingBar: {
      fullBar: "assets/gui/LANG/loadingbar.png",
      position: {x:111,y:462}
    }
  },
 
  logChoices: true,
  fonts: "assets/gui/fonts.css",
  guiConfig: "story/GUI.yaml",
  storySetup: "story/Setup.yaml",
  //as many story text files as you want
  storyText: [
        "story/LANG/YourStory.yaml"
    ],
}
Developer

How are your files arranged? As it is, you need a directory called story, and inside it three other directories called "en", "es" and "fr", inside each of them there should be a file called YourStory.yaml.

That is what i have.

Developer

Are the different language assets loaded correctly?

I don't know in the console how to see if images or files are loaded when it comes to canvas.

But all I know is that every language buttons (ES and FR)  lead me to the story in english.

Developer

What I mean is:

"assets/gui/LANG/splash.png"

This means you should different splash screen, one per language. Is this being loaded correctly? 

I have :

"assets/gui/EN/splash.png"
"assets/gui/ES/splash.png"
"assets/gui/FR/splash.png"

And it every time loads  : 

"assets/gui/EN/splash.png"
Developer

Then the problem is in the language chooser, it's choosing always english. The key must be in the LanguageChooser.js file, I'll check again if there's a problem with the example.

Developer

Hello Alix, you where right! There was a bug in the LanguageChooser.js file. It's fixed now both in the RenJSMultilanguage example and in the RenJSQuicktstart. You just need to replace that file with the updated one and it should work. https://gitlab.com/lunafromthemoon/RenJSMultilanguage/blob/master/RenJS/Language...

Thanks for the bug report!

(1 edit)

You're welcome :) It's working now  !