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

Support changing the locale #15

Open
pillowfication opened this issue Sep 13, 2023 · 1 comment
Open

Support changing the locale #15

pillowfication opened this issue Sep 13, 2023 · 1 comment

Comments

@pillowfication
Copy link

Currently there is no way to change the locale with the dev-harness. Seems like everything is in place for it, but there's no UI yet.

/* AppHeader/index.tsx */

import React, { ChangeEvent } from 'react';
import { Box, MenuItem, TextField } from '@alteryx/ui';

/* ... */

const AppHeader = (props: IAppHeaderProps): JSX.Element => {
  /* ... */
  const handleChangeLocale = (event: ChangeEvent<HTMLInputElement>): void => {
    handleSetLocale(event.target.value);
  };

  return (
    /* ... */
                <Grid item>
                  <FormControlLabel
                    control={(
                      <TextField
                        onChange={handleChangeLocale}
                        select
                        SelectProps={{ autoWidth: false }}
                        value={locale}
                      >
                        {localeOptions.map(option => (
                          <MenuItem key={option.value} value={option.value}>
                            {option.primary}
                          </MenuItem>
                        ))}
                      </TextField>
                    )}
                    label={<Box mr={2}>Locale</Box>}
                    labelPlacement="start"
                  />
                </Grid>
    /* ... */
  );
};
@pillowfication
Copy link
Author

The locale it is also missing.

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