Create localised string files for Android and iOS from a single CSV file.
As an application grows, maintaining the same product communication gets harder on multiple platforms. Stringer solves this problem by generating platform specific string files from a common CSV file.
Currently, the generated files include
strings.xml for Android and
localizable.strings for iOS.
kscript stringer.kt <Path to your csv file>.csv. Files will be generated in a directory named
StringerThings on the same path.
See kscript for installation and more information.
- Create the csv named
mobile-strings.csvand place it in
$homeDirectory/Downloads. The resulting file path should be
$homeDirectory/Downloads/strings.csv(default path of a downloaded file).
- The generated files are located in
See sample csv for format.
- Templating is supported: Any string between
>will be replaced with
%sfor Android and
- Any line starting with
#is treated as comment.
featurecan be provided and resource key is generated accordingly for them. Eg: The generated key for
no connection, No internet connection found, ERROR, user detailswill be
Note: Ordering matters. CSVs must be ordered as
KEY, VALUE, TYPE (optional), FEATURE NAME (optional)
Copyright 2019 Gurpreet Singh Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.