If you have a field or a combo box which has to adapt itself to the used language then you have to add a field for each language used in your application.
E.g. if you want to save the name of your customers in three languages, English, Greek and Arabic, then you need to add three columns in your table: CustomerNameEn, CustomerNameEl, CustomerNameAr.
The user also has to have a possibility to add and change the names, so there must be a view where all three customer names can be edited.
To show the CustomerName depending on the selected language you have to define a new member in the Business Entity class. For the example above you have to add the following code in the Computed Properties region:
public
string CustomerNameCur{
get {
switch (P2Translator.CultureLanguageFU) {
case "En": {
return this.CustomerNameEn; } case "De":
{ return this.CustomerNameDe; }
case "Ar":
{ return this.CustomerNameAr; }
default:
return this.CustomerNameEn;
}
}
set
{...}
}
If you use the customer name in a combo box then you have to include the following code in the xaml view in addition to the declation of the CustomerNameCur member as shown above:
<
ComboBox DisplayMemberPath="CustomerNameCur" .../>