Localizable | Simple approach | Internationalization library

 by   romansorochak Swift Version: Current License: MIT

kandi X-RAY | Localizable Summary

kandi X-RAY | Localizable Summary

Localizable is a Swift library typically used in Utilities, Internationalization applications. Localizable has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Change language in the app. Simple approach to localize strings/images. Written in Swift.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Localizable has a low active ecosystem.
              It has 76 star(s) with 14 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of Localizable is current.

            kandi-Quality Quality

              Localizable has no bugs reported.

            kandi-Security Security

              Localizable has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              Localizable is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Localizable releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Localizable
            Get all kandi verified functions for this library.

            Localizable Key Features

            No Key Features are available at this moment for Localizable.

            Localizable Examples and Code Snippets

            No Code Snippets are available at this moment for Localizable.

            Community Discussions

            QUESTION

            When dealing with Localizable.stringsdict, why String.localizedStringWithFormat is able to produce different output with same input?
            Asked 2021-Jun-07 at 20:17

            I have a Localizable.stringsdict as follow

            ...

            ANSWER

            Answered 2021-Jun-07 at 20:17

            The description of all the formatString values is the same. But they are not the same object. The value you get back from NSLocalizedString by looking in a .stringsdict is not a mere string! It is in fact a secret object type, an __NSLocalizedString — or, as I like to call it, an NSLocalizedString.

            Let's examine one of yours (using Objective-C):

            What's this??? It turns out that, under the hood, an NSLocalizedString carries the whole .stringsdict corresponding entry inside it. And you can see why. That way, the inner key name (i.e. VARIABLE) can be used to look up the desired information in that dictionary.

            So one of your format strings effectively carries this whole dictionary inside itself:

            Source https://stackoverflow.com/questions/67865613

            QUESTION

            Localizable.strings works for String, but not for Double and Integer 32
            Asked 2021-Jun-06 at 16:53

            As a Swift newbie I am trying to localize a simple SwiftUI and Core Data project at Github:

            I have added the following en.lproj/Localizable.strings file to my project:

            ...

            ANSWER

            Answered 2021-Jun-06 at 16:53

            Use only %d. %d is for an integer type

            Source https://stackoverflow.com/questions/67861356

            QUESTION

            Add Deutsch language on swiftui
            Asked 2021-Jun-04 at 10:06

            I tried to add Deutsch Language on swiftui I added two Localizable to the project and write "Welcome" for testing.

            English Deutsch

            after building the App I just saw the English version. How Can I see in Deutsch??

            By the way, I am new to SwiftUI so I will appreciate any help.

            ...

            ANSWER

            Answered 2021-Jun-04 at 09:54

            In Xcode:

            1. Go to Product menu
            2. Hold down option key and select Run...
            3. Select Options tab and select German for the App Language
            4. Run

            Source https://stackoverflow.com/questions/67833483

            QUESTION

            Swift Package not localizing correctly after Xcode 12.5 Update
            Asked 2021-May-28 at 07:58

            I have a Swift Package that has multiple translations in folders inside a "Resources" folder, e.g. "Resources/de.lproj/Localizable.strings" and "Resources/en.lproj/Localizable.strings".

            Since I updated to Xcode 12.5, the App implementing this Swift Package does always fallback to English, it only returns Strings localized in English. My Package.swift has "de" as default:

            defaultLocalization: "de",

            Example: Running the app on a device set to German:

            ...

            ANSWER

            Answered 2021-May-28 at 07:58

            The issue was that the host app does not seem to have any localizations, so the Swift Package won't localize either.

            There is a thorough explanation on the Swift Forums: https://forums.swift.org/t/swift-package-manager-localization/46685/6

            It sounds like the real issue might be you are expecting libraries to use additional localizations beyond those supported by the main application bundle. If so, setting CFBundleAllowMixedLocalizations to YES in the application’s Info.plist is the proper solution.

            Source https://stackoverflow.com/questions/67707158

            QUESTION

            How to find all available Strings-Tables in iOS project?
            Asked 2021-May-27 at 09:43

            Is it possible to find all localization tables which are available in a iOS Project?

            Background:

            In a Swift based iOS project I am using multiple, localized .strings files. For example one file containing common strings used in different project, one file project specific strings, etc.

            This works fine using a custom localization method which checks if a given string is found in file/table A and continues its search in file/table B if no translation is found:

            ...

            ANSWER

            Answered 2021-May-27 at 09:43

            This should do the trick:

            Source https://stackoverflow.com/questions/67719247

            QUESTION

            Change language inside the app using Picker view
            Asked 2021-May-13 at 18:51

            My task is to change the language settings from English to two other languages. I added those languages in the Localization and creates Localizable string file where I added those three languages, however, I don't know how to apply this changes. I need to pick a language from a picker, press "save" and apply those changes. Also I have a button "Reset" which will turn the app back to English. I would like to see the exact code of how to apply it< if possible, please

            ...

            ANSWER

            Answered 2021-May-13 at 18:51

            You just need to simply set the language key in the UserDefaults to alter the language of the app. Although, the views will have to be reloaded to apply these changes to the strings that are already being loaded.

            Here's a working example that you can use:

            Source https://stackoverflow.com/questions/67524389

            QUESTION

            Localizable Information in App Store Connect resets after release
            Asked 2021-May-05 at 11:45

            I really don't understand how Localizable Information works in App Store. When the new version in the draft status, we fill in the Name and Subtitle fields. Then, when this version is in the "In Review" or "Pending Release" state everything looks good and these files are in the locked state, please see the screenshot:

            But after the build is released all languages are deleted except English, and we have to add them again:

            That's really annoying. Does anyone know what could be the problem?

            Thanks a lot!

            ...

            ANSWER

            Answered 2021-May-05 at 11:45

            It was a bug on App Store Connect bug and I believe they fixed it.

            Source https://stackoverflow.com/questions/67330315

            QUESTION

            ReSharper not identifying XAML Resources as Localizable
            Asked 2021-May-05 at 10:32

            I have a WPF project and am trying to use R# to localize. It is working great with one caveat. It identifies all the localizable strings in my primary code but it's not identifying them in XAML files. I can go through the files manually and Ctrl-RO and it will move them to the resource file just fine but it doesn't identify them for me.

            It's been a while since I did localization but I really thought it used to do this, what am I missing? I looked through the settings but everything I could see was turned on. The project is set to localizable and the inspector is set to pessimistic.

            I feel like I'm missing something dumb but I don't know what it is. If anyone can point me to it I would be very grateful...

            ...

            ANSWER

            Answered 2021-May-05 at 10:32

            XAML files are not supported by the ReSharper localization mechanism, there is a feature request about this matter.

            Source https://stackoverflow.com/questions/67322680

            QUESTION

            Where can i find msi table column properties?
            Asked 2021-Apr-09 at 11:03
            CREATE TABLE `Directory` 
            (
                 `Directory` CHAR(72) NOT NULL, 
                 `Directory_Parent` CHAR(72),
                 `DefaultDir` CHAR(255) NOT NULL LOCALIZABLE PRIMARY KEY `Directory`
            )
            
            ...

            ANSWER

            Answered 2021-Apr-09 at 11:03

            MSI SDK: This section in the MSI SDK lists the built-in MSI tables: https://docs.microsoft.com/en-us/windows/win32/msi/database-tables - see the Orca section below for more technical information: the file "orca.dat" in the Orca installation folder holds the schema.

            Technicalities: A few things first: The tables starting with underscore: _ such as _Validation and _Streams are special tables - most of which are not visible from within Orca.

            • The _Validation table is a system table that essentially shows the database schema. It is used during MSI database validation (recommended read). You can see the different: Database Column Data Types.

              • Validation runs a series of checks on the MSI database and its content to check for common problems as well as consistency with the database schema.
              • The database checks are implemented in *.CUB files. They can contain runnable code against the database - for example VBScript files. Open the *.CUB files with Orca to see the content.
              • Validation can be invoked interactively from Orca or via the command line.
            • The _Streams table is a temporary table which is involved with SQL statements. Same thing with _Storages. And there are a few more such system tables.

            Orca: Orca is the SDK tool for viewing and modifying MSI database files.

            • You can use Orca to open an MSI and select Tables => Export Tables... Specify an output directory and select to export all tables. You get *.idt files with description of the content. Open in Notepad or any text editor.

            • In the Orca installation folder there is a file called "orca.dat". This is apparently the database schema for MSI files. You can use the "Export Tables" approach for this file after you open it in Orca. Just export all tables and this should be all valid MSI tables exported to *.idt format. There will be headers which should indicate the datatypes:

            MSI SDK VBScript: Included in the SDK installed with Visual Studio you will find a number of VBScript files that show a number of techniques you can use when dealing with MSI files. The Windows Installer Scripting Examples. Look under: %ProgramFiles(x86)%\Windows Kits\10\bin\10.0.17134.0\x86 - replace with the current numbers for the penultimate folder name. Quick preview of the files here.

            Source https://stackoverflow.com/questions/66999479

            QUESTION

            How to change localisation from storyboard to strings file
            Asked 2021-Apr-05 at 17:09

            TLDR: Xcode generated storyboards for each language, however I want the "old"(?) *.strings files. How?

            I am currently in the process of localising my storyboards. After I enabled everything, Xcode generated another storyboard alongside the original (english) one for me to localise. I was surprised, I expected a Localizable.strings file, like the apple documentation still states as of April 3, 2021:

            For storyboard and XIB interfaces, select the user interface files (files with a .storyboard or .xib filename extension). Xcode adds a strings file to the localization folder that contains the text to translate, as well as comments that describe the user interface components. For example, if you add German to an iOS app that uses storyboards, LaunchScreen.storyboard becomes a group containing a LaunchScreen.storyboard (Base) and LaunchScreen.strings (German) file.

            I searched around the internet, in apple developer forums, watched both WWDC18 and 19 talks about localisation in Xcode, but did not find a single mention of translated storyboards.

            After the initial translation, which works great due to the simplicity of just filling everything in, it gets frustrating however, since every layout change needs to be repeated for every language. This can't be intended, there must be a better way, right? Sadly, I didn't find anything. Even a hint to a piece of documentation regarding these storyboard copies would be greatly appreciated. Thanks!

            There are some screenshots of the possibility to convert these two formats via a dropdown, like the third picture in this post. However for me, there is no dropdown next to the language item when I click the storyboard, neither on the group, nor individual base or localised ones:

            Is this a bug or am I missing something here? I am using macOS Big Sur 11.2.3 with Xcode 12.4 (12D4e).

            ...

            ANSWER

            Answered 2021-Apr-05 at 17:09

            Turns out, you need to use the Base Localization feature, the dropdown then appears and you can convert existing storyboards to *.strings files.

            Source https://stackoverflow.com/questions/66930845

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Localizable

            All logic is in Localizable.swift file. Just copy this file to your project.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/romansorochak/Localizable.git

          • CLI

            gh repo clone romansorochak/Localizable

          • sshUrl

            git@github.com:romansorochak/Localizable.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Internationalization Libraries

            formatjs

            by formatjs

            react-i18next

            by i18next

            version

            by sebastianbergmann

            globalize

            by globalizejs

            angular-translate

            by angular-translate

            Try Top Libraries by romansorochak

            ParallaxHeader

            by romansorochakSwift

            Blur

            by romansorochakSwift

            Reusable

            by romansorochakSwift

            MoviesViewer

            by romansorochakSwift

            AccordionMenu

            by romansorochakSwift