Skip to content

Commit d99c3ca

Browse files
Create README.md
Creation of the README.md file with the description of the component, what it is for, how to use it, and an example
1 parent 6ec39d4 commit d99c3ca

File tree

1 file changed

+24
-0
lines changed
  • Modern Development/Service Portal Widgets/Language Selector

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Language Selector with Flags
2+
3+
A language selector widget for the Portal.
4+
The user can change the instance language without having to leave the Portal.
5+
6+
<img width="255" height="95" alt="image" src="https://github.com/user-attachments/assets/af130ec4-d724-4b07-a38f-afd858b7eba2" />
7+
<img width="234" height="195" alt="image" src="https://github.com/user-attachments/assets/a2de8161-a922-4376-904d-b16f81dcc573" />
8+
9+
10+
## What it does
11+
- Displays a dropdown with flags and language names.
12+
- Automatically updates the user's language in the `sys_user` table.
13+
- Reloads the page to apply the new language immediately.
14+
15+
## Files
16+
- **HTML Template:** renders the dropdown with flag emojis and labels.
17+
- **Client Script:** handles language selection and sends the PATCH request.
18+
- **Server Script:** provides the current user ID and stored language.
19+
20+
## Example
21+
When the user selects **🇪🇸 Spanish**, the widget updates their user record and reloads the Portal in Spanish.
22+
23+
## Prerequisites
24+
- The language selected **must be installed and active** in the instance.

0 commit comments

Comments
 (0)