This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Windows.ApplicationModel; | |
using Windows.ApplicationModel.Activation; | |
using Windows.UI.Xaml; | |
using Windows.UI.Xaml.Controls; | |
namespace AppForms.Windows | |
{ | |
/// <summary> | |
/// Provides application-specific behavior to supplement the default Application class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Android.App; | |
using Android.Content.PM; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; | |
using System; | |
namespace AppForms.Droid | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms; | |
namespace AppForms | |
{ | |
public class App : Application | |
{ | |
public App() | |
{ | |
MainPage = new ContentPage | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace SharedEntities | |
{ | |
public partial class User | |
{ | |
public string PropertyConsoleApp { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace SharedEntities | |
{ | |
public partial class User | |
{ | |
public string Name { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static string GetCulture(IReadOnlyList<string> cultureDefinition) | |
{ | |
return cultureDefinition[0] == SupportedCulture.English | |
? SupportedCulture.English | |
: cultureDefinition[0] == SupportedCulture.Arabic | |
? SupportedCulture.Arabic | |
: SupportedCulture.Spanish; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Internacionalization.Infraestructure | |
{ | |
public static class SupportedCulture | |
{ | |
public const string Spanish = "es"; | |
public const string English = "en"; | |
public const string Arabic = "ar"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Internacionalization.Infraestructure | |
{ | |
public static class SupportedCulture | |
{ | |
public const string Spanish = "es"; | |
public const string English = "en"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Threading; | |
using System.Web.Mvc; | |
using Internacionalization.Infraestructure; | |
namespace Internacionalization.Controllers | |
{ | |
public abstract class BaseController : Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult SetLanguage(string language) | |
{ | |
RouteData.Values["culture"] = language; | |
return RedirectToAction("Index"); | |
} |