iOS app that translates between languages and allows users to store and delete their translations.
- Users open the app to a TranslationMe home page with a place to enter a word, phrase or sentence, a button to translate, and another field that should initially be empty
- When users tap translate, the word written in the upper field translates in the lower field; you can only translate from one language to another
- A history of translations can be stored (in a scroll view in the same screen, or a new screen)
- The history of translations can be erased
- Add a variety of choices for the languages
- Add UI flair
- Add button to conveniently switch languages
Firebase Firestore is used for the backend (to store the translations), which needs to be setup beforehand.
- Go to Firebase and click "Get Started"
- Click "Create a Firebase project"
- Enter the name of your project and click "Continue"
- Disable "Enable Gemini in Firebase"
- Disable "Enable Google Analytics", and click "Create project"
- From your new Firebase project overview page, in the Get started by adding Firebase to your app section, click the iOS+ / Apple button
- Copy the Bundle Identifier from your Xcode app
- Paste the Apple bundle ID (from your Xcode project app)
- Click the Register app button to continue
- Move the
GoogleService-Info.plistfile you just downloaded into the root of your Xcode project - (Back in Firebase) Click the Next button
- Use Swift Package Manager to install and manage Firebase dependencies by navigating to
File > Add Package Dependencies - Remove unnecessary frameworks. You only need
FirebaseAuthandFirebaseFirestore. (Select all of the other frameworks that were embedded and use the (-) button to remove them. If you accidentally remove a framework you need, you can use the (+) button to add it back) - (Back in Firebase) Click the Next button
- From your Firebase console for the app you created, in the Choose a product to add to your app section, click Cloud Firestore Cloud Firestore
- Click Create database
- Set name an location: Leave the default selections and click the Next button
- Secure rules: Leave the default selections and click the Next button (you'll update the rules in a later step)
- From the Cloud Firestore page, click the Rules menu
- Replace the rules snippet with the following snippet. This will allow any user to read and write to your database.
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow read and write access to the 'translations' collection
match /translations/{document=**} {
allow read, write: if true; // This allows both read and write access for all users
}
}
}
Tip
This is a rule for all authenticated users (though this is out of the scope of this project)
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// All authenticated users
// https://firebase.google.com/docs/rules/basics?authuser=0#all_authenticated_users
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
- Click the Publish button
Copyright 2025 Kiran Brahmatewari
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.