Skip to content

Commit

Permalink
feat(android): defaultLang option in tiapp.xml (#14027)
Browse files Browse the repository at this point in the history
* feat(android): defaultLang option in tiapp.xml

* Update android/cli/commands/_build.js

Co-authored-by: Chris Barber <[email protected]>

---------

Co-authored-by: Chris Barber <[email protected]>
  • Loading branch information
m1ga and cb1kenobi authored Apr 30, 2024
1 parent 760ca45 commit 07e9a6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,8 @@ AndroidBuilder.prototype.generateI18N = async function generateI18N() {
root.appendChild(dom.createTextNode('\n'));

// Create the XML file under the Android "res/values-<locale>" folder.
const localeSuffixName = (locale === 'en' ? '' : '-' + resolveRegionName(locale));
const defaultLang = this.tiapp.defaultLang || 'en';
const localeSuffixName = (locale === defaultLang ? '' : '-' + resolveRegionName(locale));
const dirPath = path.join(this.buildAppMainResDir, `values${localeSuffixName}`);
const filePath = path.join(dirPath, 'ti_i18n_strings.xml');
this.logger.debug(__('Writing %s strings => %s', locale.cyan, filePath.cyan));
Expand Down

0 comments on commit 07e9a6a

Please sign in to comment.