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

How does Photoshop decide which dict file (tw10428.dat) should be loaded?

Community Beginner ,
May 24, 2011 May 24, 2011

Copy link to clipboard

Copied

I want to add some ZStrings to dictionary file tw10428.dat, In my computer, the file is in folder "C:\Program Files\Adobe\Adobe Photoshop CS5\Locales\XX_YY\Support Files", Here XX_YY stands for locale notation such as en_GB, zh_tW, etc. How does Photoshop decide in which folder the dict file be found? By configration, or read locale infomation (i.e. codepage) at runtime, or traverse Locales folder?

And another question is, after I update tw10428.dat, if there is a photoshop update installed, will this dict file be replaced? If so, the ZStrings I added would be lost, How can I keep them?

Thanks for all your advice.

TOPICS
SDK

Views

4.5K

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

correct answers 1 Correct answer

Adobe Employee , May 27, 2011 May 27, 2011

There is no method to tell Photoshop to load another dat file full of zstrings.

I don't know of any way to determine the language that Photoshop will run without asking the running Photoshop.

Votes

Translate

Translate
Adobe
Adobe Employee ,
May 25, 2011 May 25, 2011

Copy link to clipboard

Copied

The installer usually puts only one dat file for the language you purchased. If you buy multilingual then you choose which language in preferences.

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 Beginner ,
May 26, 2011 May 26, 2011

Copy link to clipboard

Copied

Hi, Tom

Although there's only one default locale folder by installer, but the user may manually copy a folder of another locale (I know someone even copy other language's dat to replace the en_GB), so there should be a mechanism for photoshop.exe make a decision in which folder to find the right dictionary.

Also, I want to know when new photoshop update comes, if it would like to add strings to dictioanry, does it just append data to the end or totally replace tw10428.data?

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
Adobe Employee ,
May 26, 2011 May 26, 2011

Copy link to clipboard

Copied

I would not recommend any 3rd party developer to try and edit the dat(s) file that Photoshop installs. You have already covered many of the reasons why, even if you did modify it. The file could be replaced by an update for example.

I would recommend you come up with your own localization strategy. This way you control it and it will work with other hosts. You should be able to get the current language that Photoshop is in by asking for this ZString: "$$$/Locale/ISO=en_US" Then you can use something like what the Photoshop.jsx X-DOM script does for picking the correct file to use for Zstrings. See the files and structure found in this folder of your install.

H:\Program Files (x86)\Common Files\Adobe\Startup Scripts CS5\Adobe Photoshop

If you are writing a script this method will work for you by default. You can just tell the script engine that you are localized by:

$.localize = true;

Then use this method

$.localize("$$$/MyScriptName/SomeTagForMe/AnotherTag=Hello World");

And the proper file will be used.

If you are a plug-in writer, I would suggest looking at what the OS recommends for localizing your plug-in.

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 Beginner ,
May 27, 2011 May 27, 2011

Copy link to clipboard

Copied

Thanks for your explaination, I'm developing a photoshop plug-in, I'm not familiar with JSX scripting. Actually I have my localization strategy for all text on ADM dialogs, however, plugin menu titles also need to be translated, the only way I found is to use ZStringName property in .r reource file, then add localized ZStrings to tw10428.dat, this way is feasible but you said that tw10428.dat is probably replaced by update installer. Is there any method to let photoshop load another extra dictionary file?

I found a line "$$$/Locale/ISO=en_GB" in file tw10428.dat, that is, After photoshop runs, I could know which local version it is by getting this string, but I want to know this information before photoshop is running. example, if I know a user has a zh_TW photoshop, then I can add traditional Chinese ZStrings to a dictionary file.

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
Adobe Employee ,
May 27, 2011 May 27, 2011

Copy link to clipboard

Copied

There is no method to tell Photoshop to load another dat file full of zstrings.

I don't know of any way to determine the language that Photoshop will run without asking the running 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
Community Beginner ,
May 29, 2011 May 29, 2011

Copy link to clipboard

Copied

Thanks, maybe you're right, that means the difference exists in executable file, it is determined during compiling. So, Adobe should have build many times for different language version.

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 Beginner ,
Jun 13, 2011 Jun 13, 2011

Copy link to clipboard

Copied

LATEST

Hi Tom, you said that I should be able to get the current language that Photoshop is in by asking for this ZString: "$$$/Locale/ISO=en_US", but I'm not able to find a useful API to simply transfer a ZString such as "$$$/Locale/ISO=en_US" to a local encoded string or UTF8 or Unicode string in "Photoshop API Guide.pdf". I only found in "lightroom_sdk_guide.pdf" using script LrExportServiceProvider = {title = LOC "$$$/MyPlugin/Name=My Plug-in", file = MyPluginExportServiceProvider.lua', ... }, the function LOC is useful but I'm writting a plug-in and I need a C-style function. Do you have any idea?

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