Thank you very much!
So lets say (if I understad correct) that I have an extension with the following structure:
---CSXS
---icons
---js
---jsx
---Meta-INF
---MainExtensionFolder
I need to create a new folder called "locale" and inside create a set of other folders according to my translations (greek version, deutsch version and english).
What I will put in those folders, an js file that that leads the extension to use the right files according to the language the user uses.
How can that be possible?
Lets say that in the above structure, I have in the "Icons" folder a greek, german and english flag. I would like the extension to load the correct flag once it "reads" the language of the user's system or Photoshop's.
PS: Sorry for my silly questions, I need to realize how this works.
| I need to create a new folder called "locale" and inside create a set of other folders according to my translations (greek version, deutsch version and english). |
Correct.
| What I will put in those folders, an js file that that leads the extension to use the right files according to the language the user uses. |
No. You put in a file with the name messages and the extension .properties. .properties - Wikipedia
In your main js file you can read the content.
| Lets say that in the above structure, I have in the "Icons" folder a greek, german and english flag. I would like the extension to load the correct flag once it "reads" the language of the user's system or Photoshop's. |
You can store the path of the image in the messages.properties file.
Another way:
Get the actual Photoshop language code with
var csInterface = new CSInterface();
var hostEnv = csInterface.getHostEnvironment();
var languageCode = hostEnv.appUILocale;