-
Notifications
You must be signed in to change notification settings - Fork 0
02. Preparing your Project
In the Translator project folder, you will find a \Target folder. This contains the things that need to be copied over to the Target project. This must be done before you do your first Translator Scan and Translate.
- Copy the
\Target\TranslatorTLocalized.csfile to the target project, or link to it. - Copy the entire '\Target\Translator' folder to the target project. This folder will hold translation info unique to that target project. Do not include this folder and its files in target project builds or publishing (
build action = none, do not copy) as it is not needed by a deployed app.
-
Cache.json
Caches translations to save translation costs/latency. Translating will add items to the cache. It won't update existing items. The translated.reswfiles (nonus-EN) are rebuilt from this cache. You can edit this file if you need to adjust a translation manually or clear the cache. Your edits will persist. -
Hints.json
Defines the prompts sent to the translator (OpenAI API in this case). Edit this in the Hints tab. -
Resources.resw
A blank (no data entries) resource file. Don't edit this blank file. You'll be copying this blank file initially to the/Strings/???/folders in your target project (???=en-USorde-DE). When you add a new language, create a new folder and add this blank file. -
Specials.json
Contains non-translatable items like icons, colors, and things that may need to change for some cultures. These are not translated and are added to the necessaryResources.Reswfiles when you translate. You can edit this file. -
DetectedXamlElements.json
When you do a scan, info about all detected XAML element types defined inXamlElements.jsonwill be added here. This is informational only and is not used by Translator once the scan is complete. It is useful for viewing/troubleshooting when an element is not translated. If it isn't in this file, then the scanner did not pick it up. -
TLocalizedGets.json
When you use the included static classTLocalized.Get()with the debugger attached, an entry is created in this file for each unique.Get(). When you do a scan, the detected.xamlelement info will be merged with these.Get()'s to produce the\Strings\en-US\Resources.reswfile. You can edit this file but should not need to. -
XamlElements.json
These are the XAML elements and properties that can be detected when scanned. If it isn't on this list, scanning won't find it. You must edit this file.
You need to create a /Translator folder in the target project and add these files to it.