Type Safely

Type Safely

Use LocalizedStringResource To Store a Localized Value And Use It In SwiftUI

Daily Coding Tip 146

Millie Sturgeon's avatar
Millie Sturgeon
Aug 04, 2022
∙ Paid
herd of sheep on green grass field during daytime
Photo by Shyam on Unsplash

Start by creating a new app project and adding a new file with the Strings template. By default this should have the name Localizable.strings, which is fine. Add the following text to that file:

"key" = "This is my string";

This is a string that has "key" as its localized key, meaning this is the value we can later use to get acc…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2025 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture