Localizable | Simple approach | Internationalization library
kandi X-RAY | Localizable Summary
kandi X-RAY | Localizable Summary
Change language in the app. Simple approach to localize strings/images. Written in Swift.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Localizable
Localizable Key Features
Localizable Examples and Code Snippets
Community Discussions
Trending Discussions on Localizable
QUESTION
I have a Localizable.stringsdict
as follow
ANSWER
Answered 2021-Jun-07 at 20:17The 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:
QUESTION
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:53Use only %d
. %d
is for an integer type
QUESTION
ANSWER
Answered 2021-Jun-04 at 09:54In Xcode:
- Go to Product menu
- Hold down option key and select Run...
- Select Options tab and select German for the App Language
- Run
QUESTION
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:58The 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.
QUESTION
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:43This should do the trick:
QUESTION
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:51You 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:
QUESTION
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:45It was a bug on App Store Connect bug and I believe they fixed it.
QUESTION
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:32XAML files are not supported by the ReSharper localization mechanism, there is a feature request about this matter.
QUESTION
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:03MSI 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.
QUESTION
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:09Turns out, you need to use the Base Localization feature, the dropdown then appears and you can convert existing storyboards to *.strings
files.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Localizable
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page