如何本地化- (void)drawCricleAtPoint:(CGPoint)center inView:(UIView *)superview withRadius:(CGFloat)radius
{
CGPoint originOfSquare = CGPointMake((center.x-radius), (center.y-radius));
CGRect squareFrame = CGRectZero;
squareFrame.origin = originOfSquare;
squareFrame.size = CGSizeMake(2*radius, 2*radius);
UIView *circle = [[UIView alloc] initWithFrame:squareFrame];
circle.layer.cornerRadius = radius; //half of the width if enclosing square
[circle setBackgroundColor:[UIColor lightGrayColor]];
[superview addSubview:circle];
}
的{{1}}组件以显示本地化的日历?
即使更改输入语言,它仍会显示英文日历。 解决方案是什么?
答案 0 :(得分:0)
您只需要为LocalizationKeys.LocalizeString静态事件添加处理程序。
下面是一个本地化DateTimeInput控件文本的示例。
在static void Main()方法中,
DevComponents.DotNetBar.LocalizationKeys.LocalizeString += new DotNetBarManager.LocalizeStringEventHandler(LocalizeString);
private static void LocalizeString(object sender, LocalizeEventArgs e)
{
if (e.Key == LocalizationKeys.MonthCalendarTodayButtonText)
{
e.LocalizedValue = Properties.Resources.MonthCalendarTodayButtonText;
}
if (e.Key == LocalizationKeys.MonthCalendarClearButtonText)
{
e.LocalizedValue = Properties.Resources.MonthCalendarClearButtonText;
}
e.Handled = true;
}
您可以在此处参考官方文档。 http://www.devcomponents.com/kb2/?p=523