Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
This tutorial will guide you through configuring multi-language support in your Aspose.Cells GridJs project. It covers both frontend and backend configurations.
The tutorial is based on the demo project, please adjust according to the actual situation.
In your frontend pages, set the interface language using the local option.
In the demo project, you need to modify the index.html file.
Here’s an example:
const loadNormalContext = (sheet) => {
const option = {
updateMode: 'server',
updateUrl: '/GridJs2/UpdateCell',
showToolbar: true,
mode: 'edit',
// Supported languages: en/zh/es/pt/de/ru/nl/pl
local: 'pl', // Set to Polish in this example
};
loadWithOption(jsondata, option);
};
In the backend code, you need to set the appropriate CultureInfo before processing Excel data.
In the demo project, you need to modify the Application file.
public static void main(String[] args) {
// Set Polish locale for current thread
Locale polishLocale = new Locale("pl", "PL");
Locale.setDefault(polishLocale);
// Demonstration of locale settings
System.out.println("Current Locale: " + Locale.getDefault());
ApplicationContext context = SpringApplication.run(GridjsdemoApplication.class, args);
MyConfig myConfig = context.getBean(MyConfig.class);
// Set license for Aspose.Cells
com.aspose.cells.License lic = new com.aspose.cells.License();
if ((new File(myConfig.asposeLicensePath)).exists()) {
lic.setLicense(myConfig.asposeLicensePath);
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.