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

reverseTranslation - function request #65

Open
flovv opened this issue Aug 10, 2021 · 0 comments
Open

reverseTranslation - function request #65

flovv opened this issue Aug 10, 2021 · 0 comments

Comments

@flovv
Copy link

flovv commented Aug 10, 2021

Hi,
thanks for providing the package.

I stumbled into a problem in cases where the interface defines backend behavior.
In my case I had a list of items with https://shiny.rstudio.com/articles/selectize.html
Depending on what a user selects, the backend calculation changes.
So it would be great to translate what users can select, however as the translated items end in the backend they need to be stable. (e.g. the translation key).

A solution would be to provide a reverseTranslation function:

reverseTranslation(interfaceName="FB", currentLang="en"){
  dff <- i18n$get_translations()
  
  dfff <- dff[dff[,currentLang]==interfaceName,]
  return(row.names(dfff[!is.na(dfff[,currentLang]),]))
}
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