我的 Windows phone 8 应用程序应该可以使用英语和阿拉伯语两种语言。我已经在我的应用程序中嵌入了自定义字体并将内容类型设置为始终复制。嵌入字体是nazli.ttf。
默认情况下,应用程序的语言是英语,默认字体系列Segoe WP。每当用户将应用程序的语言更改为阿拉伯语时,我都想将字体系列更改为嵌入字体,即nazli.ttf。
if (Constants.selectedLanguage.Equals("English"))
{
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
this.FlowDirection = FlowDirection.LeftToRight;
//Setting the Default Font Family for English
title.FontFamily = new FontFamily("Segoe WP");
}
else
{
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ar");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar");
this.FlowDirection = FlowDirection.RightToLeft;
//Have to set the embed Font Family.
title.FontFamily = //How should i mention the embed font here
}
谢谢。