Check Mobile App
Read now
Start a Project

Easy Way to handle the String Localization & find the missing key in Localize string file using swift 4

Save

String Localization & find the missing key in Localize string

Most of apps work on various languages , for  supporting the various languages we have to take Language string file of respective language .

Here i will provide the full information regarding

a: How to take this file and add to project.

b: Localized using small method.

c: Track all the missing key Value:

The Above “a”  point you can cover by  this blog:

Set Language translation (String localisation) in Swift

b: Write one Extension

 

Note: GlobalData.sharedInstance.language(key: self)

– this is method that will provide the corresponding key value from localize string file.

like home = “Home”;

Here is code Snippet :

It will return corresponding value;

Now its time to use this functionality:

Exam:

self.navigationItem.title = “applicationname”.localized

it will set the value of this key from string file –  “applicationname

Now we have to track which string are missing in file ,  for that we have to do some steps:

1: Open project and follow this:

2: Click on the edit scheme:

a:  Click on Arguments and set   –   “NSShowNonLocalizedStrings YES”

b:  Click on option and check on “Localization Debugging”

3: Now its time to Track the missing string in project , after setting all this things you have to just run this project :

Then you will got warning in debug window;

I have taken the example of this:

self.navigationItem.title = “applicationnamee”.localized

I did not localized this key in string file.

so I got warning like this:

 

 

 

 

 

 

 

 

 

 

 

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

Michael Urresta

Michael Urresta

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home