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

Transliteration with preserve parameters #212

Closed
Shun-Ibiki opened this issue Aug 28, 2024 · 3 comments
Closed

Transliteration with preserve parameters #212

Shun-Ibiki opened this issue Aug 28, 2024 · 3 comments

Comments

@Shun-Ibiki
Copy link

Could the preserve Parameters() be used to get transliteration of the text?

@Stichoza
Copy link
Owner

I didn't understand what you mean. Can you explain?

@Shun-Ibiki
Copy link
Author

Shun-Ibiki commented Aug 28, 2024

Currently I am using $responseArray = $tr->getResponse('こんにちは') to get romaji/tranliteration of Japanese text. Bur when dealing with html tag, the transliteration of the tag will be messed up. So can I use preserveParameters() to do this job cleanly?

@Stichoza
Copy link
Owner

No it only works with parameters for injecting strings. Params like :this or {{this}} or any regex that doesn't get messed up by Google Translate. HTML tags are not supported. There is a pinned issue (#23) about that topic

@Stichoza Stichoza closed this as completed Sep 3, 2024
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

2 participants