Replies: 1 comment
|
If you just need to translate commands and not arguments to the commands, aliases are a very simple option, e.g.: alias create selecionar select
alias create seleccionar selectBoth translated names invoke do_select, without wrapper methods. You can load different aliases from a startup script according to the selected language. Tab completion also follows the underlying command. See cmd2’s alias documentation. For a more robust solution I think you would want to normalize keywords in a lexer/parser and apply a lookup/replace. I'm not expert at internationalizing applications as it is never something I've had to do. But Id welcome a generic feature for |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm designing a language and would like that it be internationalized, like Excel formulas. It'll support SQL-like commands such as
select,where,from, which I'd like to translate to Portuguese and Spanish (e.g.,selecionar,se,de), accepting case-insensitive commands.I've read on dynamic
CommandSets and they seem like a feasible way to install different commands depending on the user's chosen language, but I envision some boilerplate to makedo_selecionarcalldo_select.Is there any other solution that would accomplish this goal?
All reactions