The application allows you to translate the text from Russian to English, and from English to Russian.
Setting up the iOS Project
Note: This application does not work correctly when using the hardware keyboard. If you are testing this app in a simulator, you should disable the hardware keyboard.
Keyboard -> Remove the check mark
Connect Hardware Keyboard
Download the Translate project source. You can do this either by forking and cloning the repository or by downloading it as a ZIP file and extracting it.
Translate.xcodeprojfrom the folder.
Change the value of the variable
APIModel.swiftusing your API key. Get your own key.
Build the project (⌘ + B) and check for any errors.
Run the app (⌘ + R).
The application supports CoreData. This feature allows to save user translations.
The functionality includes two text input modes.
- Voice input – to use this input method, you must click on the microphone icon. After entering the text by voice, you need to press the send button to get the translation.
After the voice recording starts, the timer starts for 5 seconds. If during this time the microphone does not record the voice, the recording will stop automatically.
After the end of speech, the timer starts for 2 seconds, which determines the end of speech and stop recording.
- Keyboard input – to enter text manually, you must click on the text input field and start typing text using the application built-in keyboard.
Added a long press feature that allows you to share or copy translation.
You can also delete any translation using long press feature.