Use Xcode to find Chinese strings in a project

Source: Internet
Author: User

Shimen the main contribution, respect the work of the author, please do not reprint.

If the article is helpful to you, you are welcome to donate to the author, support the Shimen, donate the amount at random, ^_^

I want to donate: Click Donate

Cocos2d-x source Download: Dot I teleport

Games Official Download:HTTP://DWZ.CN/RWTJL

Game video preview:http://dwz.cn/RzHHd

Game Development Blog:Http://dwz.cn/RzJzI

Game Source Transfer : Http://dwz.cn/Nret1

When the project was first started, we used to develop it quickly, and we would choose to hardcode the code directly when using the string.

Like what:

 Self . Lbltime . Text @ "1 minutes ago";

But then, if there is an international demand, we will change to this:

Self  . Lbltime. Text = nslocalizedstring(@ "One_min_ago", @ "1 minutes ago ");

But as the code grows more and more, there is no one to overlook.

So sometimes we're going to search for some slip-through, and here's a quick way to share:

    1. open "Find Navigator"  
    2. Toggle the search mode to "Find > Regular Expression"  
    3. Li style= "margin:0px; padding:0px; border:0px; outline:0px; Vertical-align:baseline; " >

Look at the effect

If you're as nslocalizedstring as I am, you can replace it with a regular comment.

  1. find nslocalizedstring\ (@ "[^\]]*?") \s*,\s*@ "[^\]]*" \s*\)

Shimen the main contribution, respect the work of the author, please do not reprint.

If the article is helpful to you, you are welcome to donate to the author, support the Shimen, donate the amount at random, ^_^

I want to donate: Click Donate

Cocos2d-x source Download: Dot I teleport

Games Official Download:HTTP://DWZ.CN/RWTJL

Game video preview:http://dwz.cn/RzHHd

Game Development Blog:Http://dwz.cn/RzJzI

Game Source Transfer : Http://dwz.cn/Nret1

    Use Xcode to find Chinese strings in a project

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.