Coder Social home page Coder Social logo

iamqk / simplelocalizedtool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zsy78191/simplelocalizedtool

0.0 0.0 0.0 3.36 MB

一款简单的从源文件中获取本地化字段,并生成相应语言string文件的工具。

License: MIT License

Objective-C 100.00%

simplelocalizedtool's Introduction

SimpleLocalizedTool

本地化自动摘取工具。

使用方法

脱取文件进入拖放区域,自动在文件目录中生成Localizable.strings文件和其他对应的本地化文件。

支持的文件格式是 .m 和 .mm文件,支持的语法格式是

NSString* a = NSLocalizedString(@"这是一个测试", nil);
NSString* b = NSLocalizedString(@"第一条是普通本地化, 翻译写入Localizable.strings文件", nil);
NSString* c = NSLocalizedString(@"第二条是带注释的语句", @"这里是这条本地化语句的注释");
NSString* d = NSLocalizedStringFromTable(@"第三条是带表名的本地化语句,写在 XXX(表名).strings文件里", @"OtherFile",nil);
NSString* e = NSLocalizedStringFromTable( @"最后一条测试书写规范,空格,特殊符号(\"{@#$)等等"  ,   @"OtherFile"  ,   nil);

生成的文件

//Localizable.strings

"这是一个测试" = "这是一个测试";
"第一条是普通本地化, 翻译写入Localizable.strings文件" = "第一条是普通本地化, 翻译写入Localizable.strings文件";
"第二条是带注释的语句" = "第二条是带注释的语句";


//OtherFile.strings

"第三条是带表名的本地化语句,写在 XXX(表名).strings文件里" = "第三条是带表名的本地化语句,写在 XXX(表名).strings文件里";
"最后一条测试书写规范,空格,特殊符号(\"{@#$)等等" = "最后一条测试书写规范,空格,特殊符号(\"{@#$)等等";

simplelocalizedtool's People

Contributors

zsy78191 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.