Authenticating
Time Estimate: 2 minutesEnable developer integrations
Generate an API key
Setting up the sample project
Time Estimate: 10 minutes In each Ditto workspace, there is a sample project (✍️ DittoPay Signup Flow) that demonstrates what Ditto usage might look like, with sample comments, metadata, components, and a sample Figma file to connect to. To quickly test drive Ditto’s developer integrations, you can connect the sample project in your workspace to a frontend using one of our example apps. This is helpful for understanding:- How Ditto keeps text in sync from design to development (using our CLI)
- How components in Ditto work (and integrate with a project)
- How Ditto’s developer integrations work for React, iOS, or Android
- How to utilize Ditto variants, plurals, and variable interpolation
Navigate to the sample project
Clone one of the sample repos.
Run the app and install the CLI
README to run the app and install the pre-configured CLI — this shouldn’t take more than a few minutes!The first time you run the Ditto CLI, you’ll be asked to provide an API key.That's it! 🎉
Setting up Ditto in your own repository
Now that you’ve built an understanding of how Ditto works, you can set up Ditto to manage your own team’s strings. Don’t worry — you don’t have to do this all at once. Especially for teams with large and complex codebases, it’s always an option to have Ditto manage the text for a specific product area and expanding coverage over time. We’ll describe setup solutions depending on how you currently manage strings in your code-base.- Option 1: If you currently manage text via string files of any kind (JSON, iOS, XML, etc.). If you currently localize your text or build for mobile (iOS, Android), you fall in this category.
- Option 2: If you currently manage hardcoded text.
Option 1: If you currently manage string files
Import your string file(s) to your Ditto component library
Install the Ditto CLI in your repository
Configure CLI to fetch the imported components
Update file routes
Option 2: If you currently hard code strings
If you currently have strings hardcoded in your repository, you’ll have to decouple them into string files in order to have Ditto manage updates to strings. In addition to being easier to maintain, decoupling your content and code makes it easier to scale — meaning minimal future work required to localize or A/B test. If it’s easier, you can also start with an initial product area and expand the amount of decoupling content over time to increase the surface area of text managed by Ditto.Create components for strings
If developers reference product text in design files
If developers reference product text in design files
If developers reference spreadsheets of text (and metadata)
If developers reference spreadsheets of text (and metadata)
Install the Ditto CLI in your repository
Fetch your component library down locally as string files
Replace hardcoded text with developer IDs
Building a Robust Workflow
With the basics set up, you also can extend to be more powerful in your team’s workflow:- Connecting components to design files — this keeps text in sync from design to development. You can do this in a few seconds with component attach suggestions!
- Have Ditto handle more aspects of your development process — whether it’s the updating of keys or opening of pull requests, you can extend functionality by using our webhooks, GitHub Action, VSCode Extension, and more.