• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

use variables in other languages

New Here ,
Jul 07, 2020 Jul 07, 2020

Copy link to clipboard

Copied

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

Views

739

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
LEGEND ,
Jul 08, 2020 Jul 08, 2020

Copy link to clipboard

Copied

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,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

Problem is not excel. I've save the file as you told me, using utf-8 bit the extension of the file is xls and photoshop only read txt and csv to work with variables 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

For me the problem was Excel, as I couldn't quickly/easily change the CSV format to use Unicode encoding.

 

I used LibreOffice/OpenOffice which does make this easier.

 

I then opened the resulting .csv file into a capable plain text editor (NotePad++) which confirmed the encoding and the characters were exported as intended.

 

utf8-csv.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 16, 2020 Jul 16, 2020

Copy link to clipboard

Copied

You have to specify UTF-8 in BOTH Excel and Photoshop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

@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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2024 Jan 03, 2024

Copy link to clipboard

Copied

LATEST

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 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines