-1

I am trying to make an application which is a kind of chat application.It supports two languages:

  1. English
  2. Spanish

User can go to setting and use a toggle to change the language,on this action all the label in storyboards or text will change to selected language.Is there any library available to achieve this or I will need to this manually?

Share Knowledge
  • 121
  • 1
  • 7
  • As my knowledge you can access to settings from our app but it will reject on submission.Localisation will allow only outside the settings like manually. https://stackoverflow.com/questions/37111409/swift-how-to-change-language-inside-app. – Subin K Kuriakose Aug 25 '17 at 06:58
  • see here - https://stackoverflow.com/a/41216325/5172413 – Krishna Datt Shukla Aug 25 '17 at 07:16

1 Answers1

0

You can't load your storyboard on language change from code. You must need to relaunch your code if you want to use two storyboards for different languages. But you can use Localizable string directly from code on language change using the same storyboard. means you can change the text using your Langauge_Helper Class by connecting outlet of each and every element. You will always get the error(Not yet loaded) but it will work for localizable.strings but you can't load your storyboard without relaunching your app.

Hope it helps..

There is a third party classes which can help you in implementing localization from app setting. Here is the link - https://github.com/krishnads/iOS-CustomLocalisator

I have used the same library for the localization from app setting in my app.