RaphaelJenni/FirebaseUI-Angular

Internationalization : Language translation

Closed this issue ยท 10 comments

This is a question/feature request [if unavailable]

Hello,
Is there a way to change the UI's language according to FirebaseUi languages ?

Thank you.

Please make options for change strings. Need to localize your widget.

@olegkoff I think you don't understand. This widget is made by google/firebase itself (https://github.com/firebase/firebaseui-web). This plugin is just a wrapper of the original plugin, that it works in angular.
Please write your wishes regarding the functionality of this widget directly to the original plugin.

Ok, how can I translate srtings like "Sign in with" to any of others languages which user chose?

As mentioned in issue #15 this isn't possible by default at the moment. There are some ways mentioned.

I'm sad like a back of Seat Altea 4.

There are distributions for different languages of firebaseui (firebase/firebaseui-web#242). I just tried to import this version of firebaseui separately but this did not work. Is there some way to tell the wrapper to use a static library of firebaseui?

@davemecha
Hi, currently there isn't.
I would have to check how to provide the possibility to do that. Currently, I'm a bit busy, but I will do that when I find some time.
I would also be happy to see a PR to solve this issue ๐Ÿ˜„

@davemecha if it can help, I solved in this way:

  • git clone https://github.com/firebase/firebaseui-web
  • npm run build build-npm-{LANGUAGE_CODE} (build-npm-it for me)
  • copy the file into your project and rename using version (ex: firebaseui-it-3.5.1.js)
  • add the postinstall script "postinstall": "cp -rf firebaseui-it-3.5.1.js node_modules/firebaseui/dist/npm.js"

I also updated the package.json for firebaseui with the fixed version (e.g. 3.5.1) to make sure something does not get out of sync.

In this way I can use FirebaseUI-Angular in a specific language without any change to the library itself. If firebase/firebaseui-web#242 is gonna be solved, I can then update my solution without keeping the firebaseui localized file inside by project.

@davemecha if it can help, I solved in this way:

  • git clone https://github.com/firebase/firebaseui-web
  • npm run build build-npm-{LANGUAGE_CODE} (build-npm-it for me)
  • copy the file into your project and rename using version (ex: firebaseui-it-3.5.1.js)
  • add the postinstall script "postinstall": "cp -rf firebaseui-it-3.5.1.js node_modules/firebaseui/dist/npm.js"

I also updated the package.json for firebaseui with the fixed version (e.g. 3.5.1) to make sure something does not get out of sync.

In this way I can use FirebaseUI-Angular in a specific language without any change to the library itself. If firebase/firebaseui-web#242 is gonna be solved, I can then update my solution without keeping the firebaseui localized file inside by project.

Hi, I managed to generate my firebaseui-sk-4.1.0.js file for Slovak language as per the instructions above but I do not know where exactly to place this file in my angular project and where to add the postinstall script ("postinstall": "cp -rf firebaseui-sk-4.1.0.js node_modules/firebaseui/dist/npm.js"`) to get it working in my app. Does it belong to the app package.json in app root directory or to the firebaseui package.json in npm modules? When does it get executed? Can anyone please help?