All Projects → MoathOthman → MOLH

MoathOthman / MOLH

Licence: MIT license
Localization helper for iOS apps mainly focusing on the LTR/RTL issue

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to MOLH

i18n.cr
Internationalization API ( i18n ) for Crystal!
Stars: ✭ 36 (-65.38%)
Mutual labels:  internationalization, localization
android-studio-plugin
Integrate your Android project with Crowdin
Stars: ✭ 52 (-50%)
Mutual labels:  internationalization, localization
UE4-BYGLocalization
Simple CSV localization system for Unreal Engine 4
Stars: ✭ 54 (-48.08%)
Mutual labels:  internationalization, localization
awesome-i18n
🌍 A curated list of i18n resources for all kind of languages and frameworks
Stars: ✭ 205 (+97.12%)
Mutual labels:  internationalization, localization
lisan
🌈i18n, Reimagined! 🚀A blazing fast and super small i18n library for Javascript
Stars: ✭ 85 (-18.27%)
Mutual labels:  internationalization, localization
typesafe-i18n
A fully type-safe and lightweight internationalization library for all your TypeScript and JavaScript projects.
Stars: ✭ 1,227 (+1079.81%)
Mutual labels:  internationalization, localization
figma-static-localizer
A Figma plugin for static localization
Stars: ✭ 30 (-71.15%)
Mutual labels:  internationalization, localization
locale-switcher
Browser Extension to quickly change your browser locale.
Stars: ✭ 75 (-27.88%)
Mutual labels:  internationalization, localization
stone.js
gettext-like client-side Javascript Internationalization Library
Stars: ✭ 20 (-80.77%)
Mutual labels:  internationalization, localization
go-localize
i18n (Internationalization and localization) engine written in Go, used for translating locale strings.
Stars: ✭ 45 (-56.73%)
Mutual labels:  internationalization, localization
ad localize
ADLocalize is a simple way to manage your localization files. Supported wording sources : CSVs and Google Sheets. Localization file generation available for iOS, Android, JSON (i18next), YAML and Java properties
Stars: ✭ 22 (-78.85%)
Mutual labels:  internationalization, localization
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+31.73%)
Mutual labels:  internationalization, localization
docker-compose
Docker compose for Weblate
Stars: ✭ 62 (-40.38%)
Mutual labels:  internationalization, localization
msgtools
Tools for Developing Diagnostic Messages
Stars: ✭ 18 (-82.69%)
Mutual labels:  internationalization, localization
sketch-crowdin
Connect your Sketch and Crowdin projects together
Stars: ✭ 35 (-66.35%)
Mutual labels:  internationalization, localization
rails
Rails translation made _('simple').
Stars: ✭ 65 (-37.5%)
Mutual labels:  internationalization, localization
ngx-translate-module-loader
Highly configurable and flexible translations loader for @ngx-translate/core
Stars: ✭ 31 (-70.19%)
Mutual labels:  internationalization, localization
iXn
Control your localization of apps
Stars: ✭ 20 (-80.77%)
Mutual labels:  internationalization, localization
I18N
I18N Library for .NET, and Delphi
Stars: ✭ 48 (-53.85%)
Mutual labels:  internationalization, localization
cldr-engine
Internationalization and localization in Typescript with Unicode CLDR, batteries included
Stars: ✭ 34 (-67.31%)
Mutual labels:  internationalization, localization

MOLH

Localization helper for iOS apps mainly focusing on the LTR/RTL issue

Install

Add pod 'MOLH' to your podfile. (check https://cocoapods.org/ for more info about cocoapods)

You can install it through Swift package manager as well.

How To Use

import MOLH

Start

When you start the app

MOLH.shared.activate(true)

or

MOLH.shared.activate(false) to not use swizzling and use subclassing from MOLH* UI classes.

To reset the language

MOLH.setLanguageTo(MOLHLanguage.currentAppleLanguage() == "en" ? "ar" : "en")
MOLH.reset()

Set default

Before .activate set

MOLHLanguage.setDefaultLanguage("ar")

using without swizzling (prefered)

you can choose to not use swizzling MOLH.shared.activate(false) , in that case you subclass MOLH-UI Subclasses , like MOLHTextField , this will give you more controlability as you can by-pass the tag requirement by using forceSwitchingRegardlessOfTag and set it to true.

Images

To make sure an image is flipped when switching to RTL or to LTR, you can use flipIfNeeded() function on image or UIImage().imageFlippedForRightToLeftLayoutDirection()

Fonts

Its better to have the app fonts in one place in your app, e.g. a FontManager. and there you can decide which font to use based on the chosen language, this would be the eaiser way.

Other Frameworks and bundles

Some controls such as ActionSheetDatePicker have locale property so you can set them appropriately e.g.

actionSheetDatePicker?.locale = Locale(identifier: MOLHLanguage.currentLocaleIdentifier())

Common Issues

Collection view content are flipped in a non readable way

use this line to solve it collectionView.semanticContentAttribute = .unspecified Thanks to didats

you may check this post.

Author

Support the library

If you enjoy MOLH and I want to say thank you, you can (buy me a coffee)[https://www.buymeacoffee.com/moathothman]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].