添加多语言

This commit is contained in:
2025-11-03 16:37:28 +08:00
parent e4cebeac85
commit 1673a2f4be
11 changed files with 449 additions and 13 deletions

View File

@@ -28,7 +28,7 @@
[self.view addSubview:close];
UILabel *title = [[UILabel alloc] init];
title.text = @"启用输入法";
title.text = [[KBLocalizationManager shared] localizedStringForKey:@"perm_title_enable" table:nil value:@"启用输入法"];
title.font = [UIFont systemFontOfSize:22 weight:UIFontWeightSemibold];
title.textColor = [UIColor blackColor];
title.textAlignment = NSTextAlignmentCenter;
@@ -37,7 +37,8 @@
[self.view addSubview:title];
UILabel *tips = [[UILabel alloc] init];
tips.text = @"1 开启键盘 > 2 允许完全访问";
// Localizable.strings
tips.text = [[KBLocalizationManager shared] localizedStringForKey:@"perm_steps" table:nil value:@"1 开启键盘 > 2 允许完全访问"];
tips.font = [UIFont systemFontOfSize:14];
tips.textColor = [UIColor darkGrayColor];
tips.textAlignment = NSTextAlignmentCenter;
@@ -54,7 +55,7 @@
[self.view addSubview:card];
UIButton *open = [UIButton buttonWithType:UIButtonTypeSystem];
[open setTitle:@"去设置中开启" forState:UIControlStateNormal];
[open setTitle:[[KBLocalizationManager shared] localizedStringForKey:@"perm_open_settings" table:nil value:@"去设置中开启"] forState:UIControlStateNormal];
open.titleLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightSemibold];
[open setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
open.backgroundColor = [UIColor colorWithRed:0.22 green:0.49 blue:0.96 alpha:1.0];
@@ -66,7 +67,7 @@
[self.view addSubview:open];
UILabel *help = [[UILabel alloc] init];
help.text = @"没有找到键盘? 请前往 设置 > 通用 > 键盘 > 键盘 > 添加新键盘";
help.text = [[KBLocalizationManager shared] localizedStringForKey:@"perm_help" table:nil value:@"没有找到键盘? 请前往 设置 > 通用 > 键盘 > 键盘 > 添加新键盘"];
help.font = [UIFont systemFontOfSize:12];
help.textColor = [UIColor grayColor];
help.textAlignment = NSTextAlignmentCenter;