Dupnium 1.2.1

Dupnium 1.2.1

Maintained by Bas van Kuijck.



Dupnium 1.2.1

  • By
  • Bas van Kuijck

Dupnium

Dupnium

Dupnium is part of the E-sites iOS Suite.


A small helper class for localization

forthebadge forthebadge

Platform CocoaPods Compatible Travis-ci

Installation

Podfile:

pod 'Dupnium'

And then

pod install

Implementation

Example Localizable.strings

"welcome_text_string" = "Welcome user!";
"apples##{other}" = "%zd apples";
"apples##{one}" = "%zd apple";

Swift

import Dupnium

typealias Dup = Dupnium.shared

// Sets the fallback language to dutch, if your current locale isn't available
Dup.fallbackLocale = Locale.dutch() 

Dup["welcome_text_string"] // -> Welcome user!

Dup["apples", 2] // -> 2 apples
Dup["apples", 1] // -> 1 apple

UI

LocalizableButton and LocalizableLabel are available that will automatically set translations if you provide the translated key as text in your storyboard or xib

pod 'Dupnium/UI'