Comments (5)
as a workaround, you can extend it and translate indiviual methods:
class AddToGermanHomeScreen extends window.AddToHomeScreen {
_genTitle() {
return this._genTitleWithMessage(
`Installieren Sie die ${this.appName} App, um fortzufahren`,
);
}
_safariAddToHomeScreenButtonDe() {
return (
'data:image/svg+xml;base64,' +
btoa(`<svg xmlns="http://www.w3.org/2000/svg" width="161" height="30" fill="none">
<path fill="#F5F5F5" d="M0 0h161v30H0z"/>
<path fill="#000" d="M151.984 19.251a3.767 3.767 0 0 1-1.104 2.654A3.733 3.733 0 0 1 148.226 23l-9.482-.017a3.747 3.747 0 0 1-2.65-1.104A3.757 3.757 0 0 1 135 19.222l.016-9.473a3.767 3.767 0 0 1 1.104-2.654A3.733 3.733 0 0 1 138.774 6l9.482.017c.995.001 1.948.399 2.65 1.104A3.757 3.757 0 0 1 152 9.778l-.016 9.473Zm-1.225-9.3a2.686 2.686 0 0 0-.78-1.894 2.675 2.675 0 0 0-1.888-.787l-9.167-.016a2.667 2.667 0 0 0-2.472 1.648 2.685 2.685 0 0 0-.206 1.023l-.015 9.059a2.666 2.666 0 0 0 .779 1.894 2.676 2.676 0 0 0 1.889.787l9.166.016a2.676 2.676 0 0 0 2.473-1.648c.134-.324.204-.672.205-1.024l.016-9.058Z"/>
<path fill="#000" d="M147.189 14.019h-7.056a.641.641 0 1 0 0 1.283h7.056a.642.642 0 0 0 0-1.283Z"/>
<path fill="#000" d="M144.302 18.189v-7.057a.641.641 0 1 0-1.283 0v7.057a.641.641 0 1 0 1.283 0Z"/>
<text xml:space="preserve" fill="#000" font-family="-apple-system, BlinkMacSystemFont, sans-serif" font-size="12" font-weight="500" letter-spacing="0em" style="white-space:pre"><tspan x="6.313" y="18.048">Zum Home-Bildschirm
</tspan></text>
</svg>
`)
);
}
_genIOSSafari(container) {
var containerInnerHTML =
this._genLogo() +
this._genModalStart() +
this._genTitle() +
this._genListStart() +
this._genListItem(
'1',
`Tippen Sie auf die
<img
class="adhs-ios-safari-sharing-api-button"
src="${this._genAssetUrl('ios-safari-sharing-api-button.svg')}"/>
Schaltfläche unten.`,
) +
this._genListItem(
'2',
`Wählen Sie
<img
class="adhs-ios-safari-add-to-home-screen-button"
src="${this._safariAddToHomeScreenButtonDe()}"
/>
aus dem Menü, das sich öffnet.
<span class="adhs-emphasis">
Möglicherweise müssen Sie nach unten scrollen, um diesen Menüpunkt zu finden.
</span>`,
) +
this._genListItem(
'3',
`Öffnen Sie die <img class="adhs-your-app-icon" src="${this.appIconUrl}"/> app.`,
) +
this._genListEnd() +
this._genModalEnd() +
`<div class="adhs-ios-safari-bouncing-arrow-container">
<img src="${this._genAssetUrl('ios-safari-bouncing-arrow.svg')}" alt="arrow" />
</div>`;
container.innerHTML = containerInnerHTML;
container.classList.add('adhs-ios');
container.classList.add('adhs-safari');
}
}
from add-to-homescreen.
The project now supports multi-language through i18n. Just take a look at src/locales
folder and you will find some translation files. Just make a copy of one of them and translate the strings to Spanish and then add your new locale in src/index.js
.
Create a pull request so the maintainer will push it into the original code.
from add-to-homescreen.
Which languages are you specifically looking for?
from add-to-homescreen.
I look for spanish language partner
from add-to-homescreen.
I edit the assets to spanish language, and the JS file.
share with US in: https://drive.google.com/drive/folders/1jWfTnk0WIWt_KE0McGjNp2iojZ-0Rp5D?usp=sharing
from add-to-homescreen.
Related Issues (16)
- CSS Conflicts HOT 1
- how to close guides?How to not display the guidance process for the second time? HOT 1
- Modal still appearing on desktop with showErrorMessageForUnsupportedBrowsers set to false HOT 2
- The Modal POPUP dont disappear on click outside in desktop PC browsers HOT 1
- I have three problems HOT 4
- In Chrome Browser instead of the text maybe show the user the steps to install PWA in Chrome ? HOT 2
- Chrome iOS does not save to homescreen as native app
- add-to-homescreen not page specific
- Chrome Desktop Supports PWA installation banners HOT 1
- google analytics event function?
- Idea: Read name / icon from manifest.json HOT 1
- Button is not translated HOT 1
- Doesn’t work on iPad, displays “install on mobile device”
- Incorrect information displayed for iOS Safari (iPhone 15 Pro) HOT 5
- Adding 'ru' locale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from add-to-homescreen.