Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StandaloneSearchBox - Translating loading text #3368

Open
bdubetink opened this issue Jul 31, 2024 · 0 comments
Open

StandaloneSearchBox - Translating loading text #3368

bdubetink opened this issue Jul 31, 2024 · 0 comments

Comments

@bdubetink
Copy link

Hi,

I am using the StandaloneSearchBox component in my react application. While the application load, before the input is render, we see for like .25 or .5 seconde the word "Loading...".

I have looked in documentation and on google and I can't find how is it possible to translate this text. My app is available in two language.

The component is use as children of the LoadScript component. I see there is a language props for the LoadScript component, but whatever I put in the language props it's making no change.

This is how the components are used :

<LoadScript
      googleMapsApiKey={`${apiKey}&loading=async`}
      libraries={libraries}
    >
      <StandaloneSearchBox
        onLoad={(ref) => (inputRef.current = ref)}
        onPlacesChanged={handleLocationChanged}
      >
        <input
          ref={autocompleteInputRef}
          type="text"
          className="location-autocomplete-input text-body-sm"
          placeholder={t("step1.filters.locplaceholder")}
          value={formikProps.values.location}
          onChange={(e) => {
            handleLocationEmpty(e);
          }}
        />
    </StandaloneSearchBox>
</LoadScript>

Your Environment

os: windows

node --version 18.8.0

react version 18.2.0

webpack version 5.90.0

@babel version 7.24.3

@react-google-maps/api version 2.19.3

Basic implementation of incorrect behavior in codesandbox.com : https://codesandbox.io/p/sandbox/relaxed-bardeen-cgdcyc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant