18、iOS应用本地化全流程指南

iOS应用本地化全流程指南

1. 项目本地化

要对项目进行本地化,可按以下步骤操作:
1. 在Xcode项目导航器中,单击“LocalizeMe”。
2. 在编辑区域点击“LocalizeMe”项目(而非目标之一),接着选择项目的“Info”标签。
3. 在“Info”标签里找到“Localizations”部分,这里会显示一种本地化设置,即开发语言(例如英语),这通常被称为基础本地化,是Xcode创建项目时自动添加的。
4. 点击“Localizations”部分底部的加号(+)按钮,从弹出列表中选择法语(fr)。

添加新语言时,有时基于已有本地化的文件来创建新语言的文件会更有利。例如,在已翻译成法语的项目中创建瑞士法语本地化时,可在添加瑞士法语本地化时选择法语作为参考语言。目前,只有两个文件需要本地化,且起始语言只有基础语言这一个选择,所以保持默认设置并点击“Finish”即可。

添加法语本地化后,项目导航器中的“Main.storyboard”和“Launch.storyboard”文件旁会出现一个展开三角。展开后会发现,“Main.storyboard”现在显示为一个包含两个子项的组,第一个是“Main.Storyboard”,标记为“Base”;第二个是“Main.strings”,标记为“French”。“Base”版本是创建项目时自动生成的,代表开发基础语言。“LaunchScreen.storyboard”文件也是如此。这些文件实际上位于两个不同的文件夹中:“Base.lproj”和“fr.lproj”。

以下是项目本地化的流程图:


        
iOS小技能:本地化字符串指定参数顺序(应用于app内多语言切换) 文章目录前言I 、 例子1.1 效果see also 前言 完整的demo源码 对于在中英文语法的区别,在本地化字符串的时候,我们常常需要调整stringWithFormat的参数顺序 原理:在%和@中间加上1,2,2,2等等就可以啦,数字代表参数的顺序。 I 、 例子 self.FORMATLab.text = [NSString stringWithFormat:KNLocal(@"FORMAT", nil), @"csdn", @"https://kunnan.blog.csdn. 阅读详情

相关推荐

21、iOS应用程序本地化指南

本文详细介绍了如何为iOS应用程序实现本地化,包括文本、图像和应用程序名称的本地化步骤。通过使用NSLocalizedString函数、故事板文件的导出与导入、动态选择图像以及调整Xcode方案进行测试,您可以确保应用程序在不同语言环境中流畅运行并提供一致的用户体验。

cream的博客 422

17、iOS应用本地化:原理、实现与示例

本文详细介绍了iOS应用本地化的原理、实现方法以及一个具体的示例应用LocalizeMe的开发与本地化过程。内容包括iOS本地化架构、字符串文件的使用、资源加载流程、本地化界面设计、代码实现以及如何测试本地化效果。通过这些内容,开发者可以掌握如何将iOS应用适配到不同语言和地区,提升应用的全球化支持能力。

devops8pract的博客 113

iOS小技能:本地化(Internationalization & Localization)

如果要添加本地化功能,需要为每种支持的语言创建一个子目录,称为”本地化文件夹”,通常使用.lproj作为拓展名。当本地化的应用程序需要载入某一资源时,如图像、属性列表、nib文件,应用程序会检查用户的语言和地区,并查找相匹配的本地化文件夹。如果找到了相应的文件夹,就会载入这个文件夹中的资源。NSLocale实例包含了针对这个地区内特定一群人的所有语言文化基准,其中包括:划重点应用内切换语言生效的技术实现:使用NSDateFormatter和NSNumberFormatter时需要设置 NSLocale,这样

专注于计算机研发知识和资讯分享 1595

Petalinux 2021.1 + Vivado 2021 实战:手把手教你为Zynq板卡移植Linux并搞定AXI DMA驱动

本文详细介绍了基于Petalinux 2021.1和Vivado 2021工具链,为Zynq开发板移植Linux系统并开发AXI DMA驱动的全流程。从环境配置、硬件设计到驱动适配与性能优化,提供了实战避坑技巧和版本特异性问题的解决方案,帮助开发者快速构建高速数据传输系统。

weixin_42641741的博客 389

Maven

是一款自动化构建工具,专注于Java项目的构建、依赖的管理。

weixin_58738870的博客 2166

使用autodl服务器运行CasMVSNet以及使用colmap产生的数据

MVSNet学习

qq_44708206的博客 3276

电源防反接保护电路全攻略实战A04

本文深入剖析了硬件设计中电源保护电路的关键技术与实战经验。文章指出,保护电路虽小但至关重要,通过对比分析二极管与MOSFET防反接方案,揭示了MOSFET在效率、温控方面的优势。针对过压保护,重点讲解了TVS二极管选型要点,强调钳位电压而非击穿电压才是保护核心。文章结合工业案例(如48V通信模块烧毁、5V系统MOSFET过热等),详细阐述了PCB布局规范、热设计路径等工程细节,并提供了USB接口ESD防护的完整选型方案。最后强调硬件设计必须考虑最坏工况,在成本与性能间找到平衡点,避免因小失大。

启芯硬件的博客 787

【U-Net 数据集制作】如何制作自己的图像分割数据集?(标注与格式转换),图像分割数据集制作与转换神器

在前面的课程中,我们像搭积木一样手写了 U-Net 的网络架构。很多同学迫不及待地想把自己的图片喂进网络开始“炼丹”。但是,深度学习界有一句名言:“数据决定了模型的上限,而网络结构只是在逼近这个上限。用标注工具标出来的是 JSON 文件,怎么变成 U-Net 需要的黑白掩码(Mask)图?为什么我的 Mask 肉眼看是黑白的,一放进 PyTorch 训练就报?如何快速按 8:2 的比例把几千张图片和标签划分成训练集和验证集?

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 199

Python爬虫教程:抓取纽约时报文章存档

爬虫技术主要用于从网站上抓取并提取数据。HTTP请求:使用requests库发送HTTP请求以获取网页。网页解析:使用或lxml库解析HTML网页。数据存储:将抓取的数据保存为CSV、JSON等格式,或者存储在数据库中。防反爬虫技术:模拟正常的用户请求,避免被反爬虫机制封锁。多线程与异步爬取:提高抓取效率。通过这篇博客,您已经学习了如何使用Python爬取纽约时报的历史文章存档。本文介绍了如何模拟请求头、抓取网页内容、解析HTML并提取数据,最后存储到CSV文件或数据库中。

2201_76125261的博客 598

蓝牙协议栈详解(3)——BTstack

BTstack是一个轻量级蓝牙协议栈,支持经典蓝牙(BR/EDR)和低功耗蓝牙(BLE)。它采用事件驱动模型,可运行在MCU/CPU上,通过HCI接口与蓝牙控制器通信。协议栈包含完整的蓝牙协议层支持,如L2CAP、RFCOMM、ATT/GATT等,并提供丰富的示例代码。 主要特点包括模块化设计、开源授权、支持多种HCI传输方式(UART/USB)和操作系统适配。开发时需要关注事件驱动编程模型、内存配置优化、HCI传输稳定性等问题。典型应用场景包括SPP串口通信、BLE外设开发等。 使用建议从最小示例开始,逐

嵌入式软硬件叶玄 303

从零到一构建一个智能爬虫 Agent 完整教程

本文将打造一个具备自主决策、动态解析、反反爬、持久化能力的智能爬虫 Agent

数据知道的博客 4805

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 9、寻找函数最小值的算法解析
下一篇: 29、非确定性动态故障树的模块化方法
devops8pract
博客等级 码龄4年 534粉丝 849原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址