Skip to main content
Participant
July 8, 2020
Question

use variables in other languages

  • July 8, 2020
  • 3 replies
  • 1621 views

Hello,

I was following all the video tutorials about the use of variables with a .txt or .csv file and it works well and is very usefully but why I can not use when the txt or csv file contain characters in other language that is not spanish or english? I work in Korean company and we design in both languages (english and korean) so our excel tabkles contain mostly korean characters but when are written in the txt or csv file photoshop can not recognized and just sustitude the text for strange symbols. Anybody got this problem too and know how to solve it? thanks

This topic has been closed for replies.

3 replies

schroef
Inspiring
December 30, 2023

Jsx can do localize, therefor you use json kind of setup and use 1 variable name which has all the languages inside. When Photoshop uses a different language than day English, when the script is called it will put the variable in that language.

 

Here is an example of how a cancel button and ok button will look like

 

};
locCancelBtn = {
    en: "Cancel",
    fr: "Annuler",
    nl: "Annuleer",
    ch: "取消"
};
locOkBtn = {
    en: "OK",
    fr: "OK",
    nl: "OK",
    ch: "好",
};

var cancelBtn = ("button");
cancelBtn.text = localize(locCancelBtn);

 

Are you seeing the special characters or do you get characters with weird characters aside. You could have a look at html ASCII characters. I know I some cases when using script special characters are not read properly and using html ASCII characters can fix this

 

Participant
December 30, 2023

Hello!

currently I have the same problem. When I import the txt/csv file, instead of what I typed in the file, it just shows question marks.

Did you find a solution?

If you did, could you please help me?

Stephen Marsh
Community Expert
Community Expert
December 30, 2023

@Mahsa34523741ma08 

 

Have you read the entire topic thread?

 

What encoding is the text file?

 

What encoding options are you using when importing the data-set file in Variables?

Participant
January 3, 2024

Hi! 

I finally fixed the issue by changing the encoding and the text replacement option works great.

But now I have an issue with pixel replacement. Photoshop closes as soon as I import the csv file.

I searched for a solution and someone said I should uncheck the use of GPU. But that didn't work either.

I'd appreciate it if you could find a solution 🙂

Legend
July 8, 2020

You need to set the text to unicode and use a text editor that supports unicode.

 

File.encoding sets the encoding for a text file. You want to use UTF-8 most likely,

rbkgarcia
Participating Frequently
July 15, 2020

Oh I see!@ but I am really new with excel so....  an you tell me what is "unicode"? 

So basically the problem not cames from photoshop? Problem is how excel make the codification for the foreigner language? Or problem is the note bloc?

Legend
July 15, 2020

You would need to post on an Excel site to get Excel help.