Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-localization-strings

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-localization-strings

Cordova Plugin for handling localization strings on InfoPlist.strings and Localizable.strings on iOS, strings.xml on Android

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
961
decreased by-5.88%
Maintainers
1
Weekly downloads
 
Created
Source

Cordova Localization String Plugin

This plugin helps you to manage string files that you need natively, namely on Localizable.strings and InfoPlist.strings on iOS, and strings.xml on Android.

This plugin also lets you localize your app name on both iOS and Android.

Using

Install the plugin by fetching the dependencies

$ cordova plugin add https://github.com/kelvinhokk/cordova-plugin-localization-strings.git --fetch

Modify your project root to have the following structure:

Cordova Project Root
  |
  |__ translations
           |
           |__ app
                |
                |__  en.json
                |__  zh.json
                |__  ja.json
                

A JSON file may look like this

{
  "APP_NAME": "Some App Name",
  "HAVE_MAIL_TITLE": "You have mail.",
  "HAVE_MAIL_MSG": "%1$@ has you a message titled \\\"%2$@\\\""
}

Install iOS or Android platform

cordova platform add ios
cordova platform add android

Run the code

cordova prepare ios 

Dependencies

This plugin depends on a fork on the node-xcode project, that is currently not in the master yet.

Details (iOS)

The plugin reads the assumed directory structure. If the json file contains the "APP_NAME" property, the CFBundleDisplayName and CFBundleName properties in the InfoPlist.strings will be created and placed in the respective locale.lproj directory. The rest of the strings will be placed in the Localizable.strings file and placed in the locale directory.

Details (Android)

The plugin reads the assumed directory structure, and the app_name property will be updated, and the rest of the properties inserted in to the strings.xml of the locale's /res/val-locale/strings.xml

Keywords

FAQs

Package last updated on 09 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc