Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.97 KB

README.md

File metadata and controls

71 lines (47 loc) · 1.97 KB

NibLocalizers

Localize all your Xamarin.iOS storyboards and xibs automatically with just one line of code!

Install

Available on NuGet

NuGet

Quickstart

Set keys in your storyboards/Nib

Initialize from an iOS Localizable.strings file

public class AppDelegate : UIApplicationDelegate
{
	public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
	{
		// Loads string from "Localizable.strings"
		Localization.InitializeFromBundle();
		return true;
	}
}

Initialize from a Resources.resx file

public class AppDelegate : UIApplicationDelegate
{
	public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
	{
		// Loads string from "Resources.resx"
		Localization.InitializeFromResx(Resources.ResourceManager);
		return true;
	}
}

Roadmap / Ideas

  • More built-in localized components
  • Ability to add your own component localizations
  • Add culture selection for .strings

About

This library was created for a team mate who was used to AliSoftware/OHAutoNIBi18n library for its iOS native development. I was curious about swizzling in Xamarin.iOS and found out a solution suggested by Miguel De Icaza.

Thanks to both AliSoftware and Miguel! :)

Contributions

Contributions are welcome! If you find a bug please report it and if you want a feature please report it.

If you want to contribute code please file an issue and create a branch off of the current dev branch and file a pull request.

License

MIT © Aloïs Deniel