Skip to content

Commit

Permalink
Now also writing language title next to translation
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilleke80 committed Jun 30, 2024
1 parent 80d81a1 commit 1d16700
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion playlang.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ def do_translate(input_text: str, languages) -> None:
for lang in languages:
# Call a specific function (e.g., 'my_function') from all plugins
if lang in language_plugins:
result = translate(input_str, lang)
result = translate(input_text, lang)

print(f"Language: {language_plugins[lang]['title']}")
print(f"Output : {result}")
else:
print(f"Error: No language with ID \"{lang}\" found!")
Expand Down

0 comments on commit 1d16700

Please sign in to comment.